Home feed links

How to use the built-in "Links" control, which enables the site's administrators to manage a list of links, much like the wordpress "Blogroll" widget.

General

The HomeFeeds assembly has been updated and now contains a Links control type that renders a very simple list of editable links. Much like the "Blogroll" widget, that can be found on blogs, which link off to other blog sites.

As the tool is built using the HomeFeeds assembly, the same Sort / Add page tools and such are avaliable.

The WebPage & Nav options, available to regular HomeFeeds, have yet to be fully tested with this new simplified listing. - It was built with intention of a simple list of links to external sites, but in theory in can perform the same functions as reglar feeds. - You could, for example, add a page each time a link is added, and then use it in some way to store extended information about the destination link, even track the number of times the links was clicked.

Example Config

Here's the JSON for the control appearing in the example :

{
  "cFeedType": "LINKS",
  "nMaxFeeds": -1,
  "cDataItemType": "",
  "nDataItemId": -1,
  "cListItemCtrl": "Net4orce.Canvas.General.HomeFeeds.List.LinksItem",
  "cContainerCSSClass": "",
  "cMainTitle":"My Blog Roll Links",
  "cItemCSSClass": "",
  "oImgOptions": {
    "width": "300",
    "height": "200",
    "color": "#333",
    "background": "#aaa",
    "cssClass": ""
  },
  "bEnablePaging": false,
  "cPageParam": "page",
  "nPageSize": 12,
  "cPagerPosition": "both",
  "cPagingType": "normal",
  "cSortOn": "nSort",
  "cPagerControl": "Net4orce.Canvas.General.HomeFeeds.List.Pager",
  "bEnableACL": false,
  "bEnableWebPages": false,
  "cRootURL": "",
  "cWebPageType": "",
  "cModalType": "",
  "bEnableNavSupport": false,
  "aNavDefaultPages": []
}

Main Title

You can change the Title of the listing to any value via cMainTitle property of the JSON options.

Here's the line from the example, setting the title to read "My Blog Roll Links";

"cMainTitle":"My Blog Roll Links",

Internal / External

The links can be to pages within the site, however if they are bound for another domain / site, the URL value starts with http, the target attribute is be set to _blank, opening the page in a new tab.

We should expand the logic to perform a more accurate check than the current logic :

 <% if( oFeed.cURL.StartsWith("http") ){%>
   target="_blank"
 <%}%>

Same List & Different Locations

Just as with HomeFeeds, the cFeedType field is used to specify which of the Feed DataItems are to be used when rendering the list.

This means if you had a common set of links, that you want to render a number of sections, maybe even in different locations on the page. Then you can easily achive this by using the same cFeedType value for each.