Forums / Developer / How to display an external RSS feed in a template

How to display an external RSS feed in a template

Author Message

David Zaoui

Tuesday 08 July 2008 9:54:45 am

Hello,

I have a simple question : I must display a list of some news in a template. These news can be found in a RSS feed of an other website( address of the RSS feed is like "http://www.awebsite.com/afolder/feed"). I don't know how if there is a simple was to just extract the latest news included in this feed and just displaying it in my template. Do you know ho to do that ?

Thanks

David

Ivo Lukac

Tuesday 08 July 2008 11:15:07 am

Hello David,

Don't know how good you are with writing own extensions but you can make a template operator for this case using the code from cronjobs/rssimport.php.
For this case you would not create objects in db just return the data array which you can iterate in template.

Greetz

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Ivo Lukac

Tuesday 08 July 2008 11:17:03 am

Looks like there is something already in contributions:
http://ez.no/developer/contribs/template_plugins/ezrssfeed

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac