Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #13 from ivoba/ss24

rss feed for 2.4 branch
  • Loading branch information...
commit 876e66789a326258d86528646716273bfcaabed2 2 parents 7606f48 + 008a61d
@nyeholt authored
Showing with 13 additions and 1 deletion.
  1. +13 −1 code/pages/NewsHolder.php
View
14 code/pages/NewsHolder.php
@@ -221,5 +221,17 @@ public function pagesAffectedByChanges() {
}
class NewsHolder_Controller extends Page_Controller {
+
+ public static $allowed_actions = array('Rss');
+
+ public function init() {
+ RSSFeed::linkToFeed($this->owner->Link() . "rss", _t('News.RSSLINK',"RSS feed for the News"));
+ parent::init();
+ }
+
+ function Rss() {
+ $rss = new RSSFeed(DataObject::get("NewsArticle", "", "LastEdited DESC", "", 10), $this->owner->Link(), _t('News.RSSTITLE',"10 most recent news"), "", "Title", "Content");
+ $rss->outputToBrowser();
+ }
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.