|
||
By connecting the RSS feed web part to a data source, you can create an RSS feed of the data provided by the data source. The Atom feed web part can be used exactly the same way, but the rendered feed is in the Atom format. You can use this approach to create feeds from Kentico CMS objects (forum posts, board comments, media files, ...).
The following example demonstrates how to create an RSS feed containing forum posts on the sample Corporate site. You can achieve this using the RSS feed and Forum posts data source web parts. The same procedure can be used for any other data. You only need to use a properly configured data source and process the provided data using a suitable transformation.
|
Please note
The result of the following example can also be achievable using a single web part - the Forum posts RSS feed web part, which has a built-in Forum posts data source.
Similarly, there are all-in-one web parts for other frequently used document types and objects (see the list in Syndication web parts and widgets).
|
1. Sign in to CMS Desk and select the Community -> Forums page from the content tree. Switch to the Design tab and click the Add web part () icon of the Content zone web part zone.
2. Select the Data sources/Forum posts data source web part and click OK. Leave all its properties at the default values, which will result in the data source providing all forum posts from all forum groups on the site. Click OK. The data source will be added to the bottom of Content zone.
3. Click the Add web part () icon again and select the Syndication/RSS feed web part. Click OK and enter the following in the Web part properties dialog:
•Link text: Forum posts RSS feed
•Feed name: MyForumPostsFeed
•Feed title: Corporate Site Forum Posts
•Feed description: This is a sample feed of all forum posts on the Corporate Site.
•Data source name: ForumPostsDataSource
•Transformation name: CMS.RSSTransformations.ForumPosts
Leave defaults for the rest of the properties and click OK. The two web parts should now be at the bottom of the web part zone and fully configured for the required behavior.
4. Sign out of CMS Desk and browse to the Forums page. You should see the RSS icon and link as highlighted in the screenshot below.
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=MyForumPostsFeed 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.