Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

[sitetree_link id=1773] links in the RSS Feed


4 Posts   1279 Views


31 March 2011 at 9:59am Community Member, 130 Posts


If a user subscribes to our RSS Feed ( the links in the RSS items appear as "[sitetree_link id=1773]" which means if the user clicks through on an in-item link they get a 404 page with the following URL:

How easy is it to achieve either of the following:

1.) Use a URL rewrite to redirect the sitetree_link to the correct page. Is there a native PURL format in Silverstripe? i.e.

2.) Rewrite the links during the RSS generation so they contain the current URL.



31 March 2011 at 6:54pm Forum Moderator, 5511 Posts

Hi Tama, See my post ( for an explanation.


1 April 2011 at 4:54pm Community Member, 130 Posts

Thanks Will, much appreciated.

As I side note I noticed your Silverstripe tries to parse the sitetree_link in my thread title in the HTML page <title> and breadcrumb (see attached screenshot)

Attached Files

14 July 2011 at 8:24pm Community Member, 102 Posts

Thanks Will, and thanks Tama for putting your finger on the problem.

Some woking code using Will's tip...

class ArticlePage extends Page {




   function RssContent() {

      // Pass the Content field to the RSS feed, so shortcodes are processed

      return DBField::create('HTMLText', $this->Content);



class ArticleHolder_Controller extends Page_Controller {

   function rss() {

    $rss = new RSSFeed(


       , $this->Link()

       , 'Latest news'

       , null

       , 'Title'

       , 'RssContent' // Tell the RSS feed which field to use to retrieve Content



   public function init() {

      RSSFeed::linkToFeed($this->Link() . "rss");

      return parent::init();