RSS Data Source
A RSS Data Source can be added to allow you to display an RSS Feed from another web site. For example, the Squiz Matrix web site has an RSS Feed for the Squiz Matrix Documentation. If you wanted to show this RSS Feed on you web site, you would link to it via the RSS Data Source. You would then use an Asset Listing to display the list of records obtained via the RSS Feed.
The RSS Feed types that the RSS Data Source can accept are RSS 1, RSS 2 and Atom 1. All other types will not work with this asset.
Bookmarks to the headings on this page:
Once you have created your RSS Data Source, you can configure the asset on its associated screens. Many of these screens are the same or similar to those for a Standard Page and are described in the Asset Screens manual. In this chapter we will only describe the Details screen, which is different for a RSS Data Source.
Details Screen
The Details screen for a RSS Data Source allows you to set up this asset. For more information about the Status, Future Status,Thumbnail and Details sections of the Details screen, refer to the Details Screen chapter of the Asset Screens manual.
RSS Details
This section allows you to specify the URL of the RSS feed you wish to use in your site.

The RSS Details section of the Details screen

Shadow assets
Once you enter the URL and click Commit, shadow assets will appear in the Asset Map under the RSS Data Source. For example, if you enter the URL http://matrix.squiz.net/download/documentation/feed the shadow assets shown in the figure to the right will appear. Each shadow asset represents one item from the RSS Feed. For example, the Custom Form version 3.26 shadow asset represents the Custom Form manual. For more information on shadow assets, refer to the Shadow Assets chapter in this manual.
Tip: When you change the Link For The Feed URL new Shadow Assets are created.
Shadow Asset Name
The Shadow Asset Name section appears on the screen once you have entered the URL of the RSS feed in the Link For The Feed field.

The Shadow Asset Name section of the Details screen
The fields available are as follows:
- Record Name: this field allows you to specify the name of the shadow assets. It can either be a normal string or a combination of strings and keyword replacements. For example you can enter %data_source_record_set_title% (%data_source_record_set_pubdate%) to have RSS Feed item name (RSS Feed item published date) as the name of your shadow asset.
- Date Field: this field allows you to convert a date field into a UNIX timestamp (i.e. the number of seconds since epoch). It will only list the fields that are believed to be a date field (i.e. any field with date or publish in its name). You can use the keyword replacement %ds_timestamp% to access this value.
- Available Keywords: this section provides a list of available keywords for the shadow assets. You can use any combination of these keyword replacements as well as strings as the name of the shadow assets.
Using the RSS Data Source
Once you have the RSS Data Source and shadow assets set up in your system, you can use them on your site via an Asset Listing. To see how this works consider the example of showing the Squiz Matrix Documentation RSS feed on a site.
RSS Data Source
Create a RSS Data Source asset under the Site. On the Details screen enter the URL http://matrix.squiz.net/download/documentation/feed into the Link for the Feed field and click Commit. The shadow assets are created under the RSS Data Source in the Asset Map.
Asset Listing
Create an Asset Listing under the Site. On the Details screen enter the following values:
- Asset Types to List: select Data Source Record Set. This will only show the shadow assets that appear under the RSS Data Source.
- Root Nodes: select the RSS Data Source as the Root Node for the Asset Listing.
- Direct Links Only: change this value to Yes so that it will only show the shadow assets that are under the RSS Data Source.
On the Page Contents Bodycopy for the Asset Listing, specify a title for the page.
In this example, for each shadow asset we want to show the name of the asset, description, author and a link to download the manual. As this information comes from the RSS Feed we can use the keyword replacements that are listed on the Details screen of the RSS Data Source. Edit the contents of the Default Format Bodycopy and put these keywords into the WYSIWYG Editor. An example of this is shown in the figure below.

Default Format Bodycopy
When you preview the Asset Listing, for each shadow asset under the RSS Data Source it will show the name of the asset, description, author and a link to download the document, as shown in the figure below.

Preview of the Asset Listing page