DotNetNuke supports the display of feeds from other websites, based on a number of standards including RSS and Atom, using the News Feed module.
The RSS module can be downloaded from the DotNetNuke section of the Microsoft Codeplex website:
Module Settings
The News Feed module has some specific settings grouped under their own tab under module settings.
These settings cover options which are not specific to a particular RSS feed source. Items included sourcing the news feed (cache timeout, number of retries and retry timeout), The number of items to show and standard layout files and whether to link into a new window or use the current.
Edit News Feed
Adding an RSS source in the News Feed module is simple to do. To begin click on the Add Feed button.
Add the URL reference for the news feed, for example the You Tube reference http://youtube.com/rss/user/youtube/video.rss. Dependant upon how frequently the feed is updated, you can set the cache time to reflect this. For example a source which changes on a daily basis can have a cache time of 1440 (24 hours)
If the feed source has access control then a user name and password can be configured.
There are a number of default display styles, called transformations. These are given in a dropdown list. Alternatively a file can be uploaded which handles the styling.
Some feeds are non-standard, for example Twitter. These need custom handling. There is a radio button option for this, iPreProcessor, allowing a custom option to be entered. the supplied twitter transformation is an example.
Entries are shown in a table, with an edit pencil to make changes to an individual feed configuration.
Once changes have been made, or new entries added. Click on the return button to end editing and view the page with the feed.
Popular RSS Feeds
Popular RSS feed links include:
| BBC News | http://feeds.bbci.co.uk/news/rss.xml |
| You Tube | http://youtube.com/rss/user/youtube/video.rss |
| The Register | http://www.theregister.co.uk/headlines.atom |
News Feed Styling with XSL
The news feed is styled using an XSL file. This can determine how many entries are shown
An example XSL file for styling the News feed is given below:
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" />
<xsl:param name="TITLE" />
<xsl:template match="rss">
<!-- Do not show channel image -->
<xsl:for-each select="channel/item">
<xsl:if test="position() <= 5">
<br>
<strong>
<a href="{link}" target="_blank">
<xsl:value-of select="title" />
</a>
</strong>
<br />
<!-- only display mark up for description if it's present -->
<xsl:value-of select="description" disable-output-escaping="yes" /></xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template match="description">
<br>
<xsl:value-of select="." />
</br>
</xsl:template>
</xsl:stylesheet>


