Kentico CMS 6.0 Developer's Guide

CMS RSS feed

CMS RSS feed

Previous topic Next topic Mail us feedback on this topic!  

CMS RSS feed

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

The CMS RSS feed web part can be used to easily create RSS feeds from documents in the content tree. It has a built-in Documents data source, which means that the web part can work separately without any connected data source and that it can be used to create feeds from documents of any type.

 

Apart from this universal web part, there are other web parts in the Syndication category which are pre-configured for one particular document type. See the listing in the Syndication web parts and widgets chapter.

 

In the following example, you will learn how to use this web part to create a feed link on the /Products page of the sample Corporate site. We will configure it so that it provides an RSS feed with products stored in all three categories under the page. The same procedure can be used on any other page and for documents of any other type, you just need to specify your required path, document type and transformation in the web part properties.

 

1. Sign in to CMS Desk and select the /Products page from the content tree. Switch to the Design tab and click the Add web part (AddWebPart) icon of the zoneLeft web part zone.

 

devguide_clip1002

 

2. In the Select web part dialog, select the Syndication category. Choose the CMS RSS feed web part and click OK.

 

devguide_clip1003

 

3. The Web part properties dialog opens. To achieve the required behavior, use the following configuration:

 

Link text: Products RSS feed

Feed name: MyProductsFeed

Feed title: Corporate Site Products

Feed description: This is a sample RSS feed of products on the Corporate Site.

Path: /Products/%/%

Transformation name: CMS.RSSTransformations.Products

 

Leave default values for the rest of the properties and click OK.

 

4. Sign out of CMS Desk and browse to the Products page. You should see the RSS icon and link as highlighted in the screenshot below.

 

devguide_clip1004

 

5. Click the icon or link, your browser will detect that you are accessing an RSS feed and display its content. As you can see, the URL of the feed is actually the URL of the page where the web part is placed with the ?rss=MyProductsFeed querystring appended (this can be modified using the Feed querystring key and Feed name web part properties). The same URL can be used to access the feed directly both from a browser or a dedicated RSS reader program.

 

devguide_clip1005