Customize SharePoint RSS Feeds

The default RSS feeds in SharePoint are basic and can be customized with extended RSS meta-information.

First, install the RSSBus SharePoint WebPart. After running the setup, go to the Site Collection Features page to activate the Web Part. In order to create custom RSS feeds, activate the "RSSBus Service Handler" feature.

In this example a special document library called "Really Simple Services" was created for the feeds. For the first feed, a new document was added to the library and named "sp-rss.rst" with the following contents:

<rsb:info title="My Custom RSS Feed" description="This is my custom RSS feed description" />  
<!-- this could also come as input in the URL -->    
<rsb:set attr="list" value="Shared Documents"/> 
<rsb:set item="_meta" attr="rss:title" value="Custom SharePoint RSS: [list]" />        
    
<rsb:call op="spListItems" output="out">  
 <rsb:push title="[rss:title | def('untitled item')]"> 
  [out.*]  
 </rsb:push>  </rsb:call>

Next, call this custom RSS Feed as would be expected (i.e. http://myserver/Really Simple Services/sp-rss.rsb). Except, when you hit the URL instead of downloading a document, you will get an RSS Feed. This example generates an RSS Feed out of a specific list, but it can be changed to generate an RSS feed out of any list by getting the list from the URL. For example:

<rsb:info>  
 <input name="list" default="Shared Documents" /> 
</rsb:info>      <rsb:set item="_meta" attr="rss:title" value="Custom SharePoint RSS: [list]" />        
    
<rsb:call op="spListItems" output="out">  
 <rsb:push title="[rss:title | def('untitled item')]"> 
  [out.*]  
 </rsb:push> 
</rsb:call>

Now, if you call the same URL, the Shared Documents will be returned. But, if a specific list is added to the URL, that list will be returned instead For example: http://myserver/Really Simple Services/sp-rss.rsb?list=Other Documents. The difference in the script itself is that the "list" name has been moved from an rsb:set (hard-coded) to the rsb:info input.

 
 
Products