Usage example - RSS repeater + Data source

The RSS repeater web part allows you to transform pages into RSS feeds. When a page containing the web part is accessed, the response type is changed to application/xml and the page renders the content of the feed. This is useful if you want your feed to have a dedicated URL, without the need for a querystring parameter. The Atom repeater and XML repeater web parts can be used exactly the same way, but the rendered feed is in the Atom or XML format.

The following example demonstrates how to create an RSS feed containing the data of forum posts on the sample Corporate site. The example uses a dedicated feed page containing the RSS repeater web part.

Note

The result of the following example can also be achieved 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).

 

 

Create a page containing the Forum posts data source web part:

  1. Open the Pages application.
  2. Select the Community -> Forums page in the content tree.
  3. Click New () and choose the Page (menu item) page type.
  4. Type RSS as the Page name and choose the Create a blank page option.
  5. Click Save.
  6. Open the Design tab.
  7. Add the Forum posts data source web part.
  8. Leave all properties at the default values, which causes the data source to load all forum posts from all forum groups on the site.
  9. Click OK.

Add the second web part:

  1. On the Design tab, add the RSS repeater web part onto the page.
  2. Set the following properties:

    • 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

  3. Leave defaults for the rest of the properties and click OK.

Forum posts data source and RSS repeater web parts on the Design tab

The RSS feed is now ready. To allow visitors to access the feed, create a link using the Feed link web part:

  1. In the Pages application, select the Community -> Forums page.
  2. Switch to the Design tab.
  3. Add the Feed link web part.
  4. Set the following properties:

    • Link text: Forum posts RSS feed
    • Feed URL: ~/Community/Forums/RSS.aspx
    • Feed title: My Forum Posts Feed

  5. Leave defaults for the rest of the properties and click OK.

The Feed link web part displays the RSS icon with a link leading to the specified URL.

If you view the Community -> Forums page on the live site, you can see the RSS icon and link.

RSS feed link on the live site

If you click the link, your browser detects that you are accessing an RSS feed and displays the content. The URL of the feed matches the URL of the page containing the RSS repeater web part. You can use the same URL to access the feed from both browsers and dedicated RSS reader programs.