Update rssfeed.md

add $allowed_actions
This commit is contained in:
cieszak 2013-10-15 23:01:23 +02:00
parent 7b1cbabadf
commit 092cda89af

View File

@ -43,6 +43,7 @@ SilverStripe what values to include in the feed.
:::php
class Page_Controller extends ContentController {
private static $allowed_actions = array('rss');
public function init() {
// linkToFeed will add an appropriate HTML link tag to the website
// <head> tag to notify web browsers that an RSS feed is available
@ -81,6 +82,8 @@ updates. Update mysite/code/Page.php to something like this:
class Page extends SiteTree {}
class Page_Controller extends ContentController {
private static $allowed_actions = array('rss');
public function init() {
RSSFeed::linkToFeed($this->Link() . "rss", "10 Most Recently Updated Pages");
parent::init();
@ -123,6 +126,7 @@ for all the students as we've seen before.
:::php
class Page_Controller extends ContentController {
private static $allowed_actions = array('students');
public function init() {
RSSFeed::linkToFeed($this->Link("students"), "Students feed");
parent::init();