"Knowledge has to be improved, challenged, and increased constantly, or it vanishes."

Enable RSS feed in SharePoint 2013

SharePoint 2013 have out of the box support for publishing RSS feed for lists and libraries.  For publishing portals it is important to expose the site contents as RSS feeds. In this walkthrough I am going to explain how you can configure RSS feed for lists, libraries etc. in the SharePoint portal with your own display.

For the purpose of this walkthrough, I have created a picture Library named “MyPictures” and added five pictures to this library. The thumbnail view of the picture library is as follows.

clip_image002

Now go to the library tab of your list page.

clip_image003

You can see the RSS feed icon is disabled, this is because I didn’t enable the RSS feed for my site. Now let us see how we can enable the RSS feed settings.

Enable RSS feed for Sites/Site Collection

Initially you need to enable the RSS feed for the site collection and the site where you need to expose your contents as RSS feeds.

Go to your top level site settings page, if you are in a sub site, make sure you click on “Go to top level site settings”

clip_image004

Now In the Top level site settings page, you can find RSS link under site administration.

clip_image005

In the RSS settings page, you can enable the RSS for the site or entire site collection. Also you can define certain properties such as Copy right, managing editor, web master etc. Click OK once you are done.

clip_image007

If you want to disable the RSS feed for any site, go the site settings page and click RSS link and just uncheck the “Enable RSS” checkbox and click OK.

Now let us see the effect of the changes we have made. Go to the “MyPictures” page and under library tab, see the RSS icon, you should see the icon is enabled now.

clip_image009

Click on the RSS feed icon, you will see the RSS feed in the browser.

clip_image011

Customize the RSS feed

In SharePoint 2013, the RSS feed is exposed using listfeed.aspx, you can find the listfeed.aspx under the layouts folder.

clip_image012

By default the RSS feed is using RSSXslt.aspx file, which renders XSL to the browser.

/_layouts/15/RssXslt.aspx

You can find these files under layouts folder the 15 hive. The following is the path to layouts folder when SharePoint is installed in the C: drive.

C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS

clip_image014

Though it is possible to customize RssXslt.aspx to apply your own design, it is not recommended as this is a SharePoint system file and there is a chance that this file can be replaced by patches, service packs etc.

Though RSS feeds meant for machines, you may need to present the RSS feed in your site and provide subscription instructions. So you need to perform two things here, first you need to select the data for the RSS feed to expose and secondly you need to display the RSS feed in your site in a formatted way. Let us see how we can achieve the same.

Choose the data for RSS Feed

Navigate to your list page, under the library tab, click on Library settings icon.

clip_image016

Once you enabled RSS for the site, you will see a column “Communications”, locate “RSS Settings” under Communications.

clip_image018

Click on the RSS settings, you will see the below settings page

clip_image019

First you can define whether you need to enable RSS for this list, in case if you don’t want a particular list to expose as RSS feed, you can say no for this.

Under the RSS channel information; you can define a title, description and an Icon for the feed. Under document options, include file enclosures allows you to link the content of the file as encloses so that the feed reader can optionally download the file. Link RSS items directly to their files, since this is a picture library, I need the item to link directly to the image. You can select these options depending on your needs.

clip_image020

In the columns section, you can select the columns that you need to include in the RSS feed, also you can specify the order of the columns in the feed.

clip_image021

Under Item Limit, you can specify the maximum number of items and the maximum age for the item, by default items in the past 7 days will include, you can configure this based on your needs. Click OK once you are done.

See the output XML generated by listfeed.aspx

clip_image023

Display RSS feed in your page

Now you may need to include this RSS feed in your page. In order to do that you can use the XML viewer web part available in SharePoint 2013 and specify a XSLT for transforming the feed to formatted output.

First create a page and insert a web part, under the web part selection menu, select Content rollup as the category and then select the XML Viewer web part and click on the Add button.

clip_image025

In the Web part settings you can define XML url and XSL url.

clip_image026

I just created a simple XSL file, you can download the text version of the file from here.

The following is the output generated in the browser once I applied the attached xsl.

clip_image028

Summary

SharePoint 2013 supports exposing and consuming RSS feeds without writing a single line of code. You have complete control over on what content can be exposed as RSS feeds.

5 Comments

  • Thank you for the article, it saved my day.

  • Ҭhank you for the good writeup. It in fact was ɑ amusement accoսnt it.
    Look advanced to more addеd agrеeable from you!

    By the way, how could we communicate?

  • Its sսch as yοu read my thoughts! You apƿear to grasp a lot
    approхimately this, such as you wrote the guide in it or something.

    I frel that you сould do with some p.c. to drive the message house a little bit,
    hoաever other than that, this is magnificent blog.
    A fantastic read. I'll certainly be bаck.

  • Everyonе loνes wɦat you guys tend tο be uρ too.
    This kind of clever worқ aոd reрortiոg! Keepp up the great wоrks guys I've iոclսded you guys to my blogroll.

  • You are so interesting! I do not believe I have read through a single thing like that before.

    So great to discover another person with a few original thoughts on this subject matter.

    Really.. thank you for starting this up. This site is something

    that's needed on the internet, someone with a little originality!

Comments have been disabled for this content.