SimplePie CakePHP Component
I'm working on a new design for my personal site, mcurry.net, part of which is basing the site on CakePHP. Although Cake is probably a little overkill in this situation, I've taken to using Cake for pretty much any site. The pretty urls alone make it worthwhile. And sites that start out as a single static page have a way of growing.
Part of the site is going to show the feed for this blog. SimplePie is the slickest PHP class for parsing RSS feeds. Using the class with Cake's vendor system was an easy call. While I was on the SimplePie site I came across a this component, which unfortunately wasn't up to date with the latest version of SimplePie.
I've updated the component to work with the SimplePie 1.0.1 and CakePHP 1.1 and 1.2. The updated SimplePie CakePHP component, along with instructions are now available.

7 Comments
http://simplepie.org/wiki/plugins/cakephp/simplepie_module
I was going to contact you guys, but you found it first. SimplePie rocks. Keep up the great work.
Thanks,
Aaron
However, I am having problems where to place this?
foreach ($feed->get_items(0, 5) as $item):
I believe, this should be placed on the view/ of cakephp, but I had problem extending simplepie up to the view/
Do you have any idea how I could make this work?
Thanks,
Louie
The best way is retrieve the feed in your controller or model, then set the items so they can be displayed in your view. If you look at this example you'll see the controller code in step 5 and the view code in step 6.
-Matt
Add new comment