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, Ed, biapar, Willr, Ingo, swaiba

[sitetree_link id=1773] links in the RSS Feed

Go to End

4 Posts   1715 Views


Community Member, 138 Posts

31 March 2011 at 9:59am


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.



Forum Moderator, 5523 Posts

31 March 2011 at 6:54pm

Hi Tama, See my post ( for an explanation.


Community Member, 138 Posts

1 April 2011 at 4:54pm

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

Community Member, 102 Posts

14 July 2011 at 8:24pm

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();