Inconvenient WSSv3 RSS Feeds


Windows SharePoint Services v3 ships with a possibility to create RSS Feeds for every List. This feature is quite powerful as it allows you to create multiple RSS Feeds for one List based on Views. If you have worked with Lists at least a bit, you know that you can quite easily create a custom View using the standard SharePoint interface. Without any problems you will be able to define the filter and apply the sorting criteria.

When using the SharePoint RSS Feeds with Document Libraries (like for example the Pages Library in MOSS 2007) you can select an extra option called *Link RSS items directly to their files ***** which basically tells SharePoint that it should generate links not to the ListItem View Form (eg. /Pages/Forms/DispForm.aspx?ID=1), but point to the item itself, like /Pages/default.aspx. This setting is quite important to leverage the user experience the users would expect.

As soon as you turn on the *Link RSS items directly to their files ***** option you will notice, that the titles of the RSS items point now to the Title column instead of the Name column. While in case of a Document Library the choice is up to you whether to display on or the other, showing the content of the Title field for the Publishing Pages RSS will provide consistency between the site and the RSS.

If only you have worked with custom Content Types in SharePoint 2007 you have probably found yourself in a situation when you needed to change the display name of the Title column to something else. As soon as you do however, the RSS Feed will display the Name column as the title of the RSS Feed items instead of the Title column!

I have looked at how SharePoint actually generates the RSS Feed XML, but I haven’t found the exact reason of this behavior. At some point the SPListItem.DisplayName Property is being called. This is where it all goes wrong I suspect.

Changing the display name of the Title column and preserving the RSS Feed experience

But what if you are required to change the display name of the Title column and yet want to benefit of the RSS Feed functionality? As far as I know you have at least two choices. First of all you could create a custom HttpHandler/Application Page which would do the same as the standard SharePoint RSS Feed generator but then without the issue I have mentioned above. As far as I can tell it’s going to cost you quite some time if you want to leverage a comparable experience and attach your custom RSS Feed generator to all existing links.

Secondly you could create a Page Adapter and attach it to the ListFeed.aspx page. Using some simple Regular Expressions you could grab the contents of the not-anymore-title-column and paste it between the <title> element of the RSS Feed item. I admin that it’s not a really neat solution yet it works, costs far less time to do it and limits the amount of custom code you need to support.

Technorati Tags: SharePoint, SharePoint 2007, WSS 3.0, MOSS 2007, WCM

Others found also helpful: