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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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

Posting RSS Feed on

Go to End

2 Posts   1498 Views


Community Member, 33 Posts

11 August 2009 at 8:20am

Edited: 11/08/2009 1:01pm

I would like to post the following pubmed RSS feed on my articleholder page:

I've looked at a number of posts on the subject and I'm still confused as there are a number of suggested approaches (some likely outdated). What is considered to be the easiest, most up-to-date way to show a rss feed on any given page (SS version 2.3.2+)?

I came across this post: where Willr suggested the following code (which I added to my ArticleHolder.php file):

function CustomRSSFeed() {
$feed = new SimplePie(URL OF THE RSS FEED);
$output = new DataObjectSet();
if($items = $feed->feed->get_items(0, 10)) {
foreach($items as $item) {
$output->push(new ArrayData(array(
"Title" => $item->get_title(),
"Link" => $item->get_link()
return $output;

Using <% control CustomRSSFeed %>$Title<% end_control %> in

However, I get the following error: Fatal error: Class 'SimplePie' not found in /Applications/XAMPP/xamppfiles/htdocs/holybasil/mysite/code/ArticleHolder.php on line 27. I put my url in quotes for $feed, without which there was an additional error.

I tried the restfulservice approach as suggested at the bottom of this link.

But just as "Superautomatic" commented in his post at, I can only get the example RSS feed to work not my own (see above for the RSS address). I suspect that it is RSS 1.0 versus RSS 2.0 issue (my RSS address being 2.0). Jam13 offered some code at the bottom of the Superautomatic posting. However, I have no idea how to implement it in a template. He doesn't give an example.

I would appreciate any help,


Community Member, 191 Posts

24 September 2009 at 9:59pm

Edited: 24/09/2009 10:01pm

I just ran into the same issue. That code worked in 2.2.x, but is now broken in 2.3.x.

It's borrowed from the Blog Module (or somewhat similar). Blog > Code > RSSWidget.php

Download the newest version of the Blog Module and grab the updated code and paste into your page. I did so, and it's working fine on my site.