Link URL does not always point to display page


I used SPRSS to point to a blog in SharePoint and the link to display page for the individual blog entries was different than list.RootFolder.Url + 'DispForm.aspx'. The URL that I needed to point to was '/Blog/Lists/Posts/Post.aspx', and I wasn't able to find an easy to get to this page from a SPList. What I did was add a 'DisplayPageUrl' to the query string to override the default link value in CleanRSS.aspx.
Thanks for this code. I was killing myself trying to parse data with XSLT directly from a SharePoint RSS feed, which concatonates all the fields I needed into a single CDATA section.


vinnyusc wrote Apr 11, 2009 at 5:23 AM

To fix this, in CleanRSS.aspx, change this line:
AddTag("link", list.RootFolder.Url + "/DispForm.aspx?ID=" + item.ID, sb);
to this:
AddTag("link", list.Forms[PAGETYPE.PAGE_DISPLAYFORM].ServerRelativeUrl + "?ID=" + item.ID, sb);

wrote Feb 13, 2013 at 12:44 AM