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 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.
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 page types and objects (see the list in Syndication web parts and widgets).
To create an RSS feed of forum posts:
- Open the Pages applications.
- Select the Community -> Forums page in the content tree.
- Switch to the Design tab.
- Add the Forum posts data source web part to the Content zone.
- Leave the web part's properties at the default values and click OK.
- This results in the data source providing all forum posts from all forum groups on the site.
- Add the RSS feed web part to the page.
- Enter the following properties for the web part:
- 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 the defaults for the rest of the properties and click OK.
You can now see the two web parts at the bottom of the web part zone.
If you view the Community -> Forums page on the live site, you can see the RSS icon and link.
Click the icon or link. Your browser detects that you are accessing an RSS feed and display the content. The URL of the feed is actually the URL of the page where the web part is placed with the ?rss=MyForumPostsFeed query string parameter appended (this can be modified using the Feed querystring key and Feed name web part properties). You can use the same URL to access the feed directly both from a browser or a dedicated RSS reader program.
Was this page helpful?