I have a code that was working in silverstripe 3.0 to show rss. But the same doesn't work on silverstripe 3.1
The code was put in mysite/code/page.php, which is as follows
<?php
class Page extends SiteTree {
private static $db = array(
);
private static $has_one = array(
);
}
class Page_Controller extends ContentController {
private static $allowed_actions = array (
);
public function init() {
RSSFeed::linkToFeed($this->Link() . "rss");
parent::init();
}
public function rss() {
$rss = new RSSFeed($this->LatestUpdates(), $this->Link(), "10 Most Recently Updated Pages", "Shows a list of the 10 most recently updated pages.");
return $rss->outputToBrowser();
}
public function LatestUpdates() {
return Page::get()->sort("LastEdited", "DESC")->limit(10);
}
}
I was able to access the rss by using the following url
http://my-web-site-add/home/rss
The error that I get on silverstripe 3.1 when following the same process
Action 'rss' isn't allowed on class HomePage_Controller.
Do I need to change something to make this work in silverstripe 3.1