I am having issues with my simplepie view.  I can get a feed but I can
not display the feed.

I am trying to follow this example: 
http://cakeforge.org/snippet/download.php?type=snippet&id=341

Please let me know what is wrong with this view...

View Index.thtml
<?php foreach ($feeddata['items'] as $feed): ?>
<div>
<h3><?php echo $feed['title']; ?></h3>
<p><?php echo $feed['description']; ?></p>
</div>
<?php endforeach; ?>

Controller:
<?php
class FeedController extends AppController
{
        var $name = 'Feed';
        var $uses = null;
        var $components = array('Simplepie');

        function index()
        {
                /**
                 * Pass 2 variables to the SimplePie component, the feed URL 
and the
location of the cache directory
                 */
                $this->Simplepie->feedurl = 
'http://www.abc.net.au/news/syndicate/
breakingrss.xml';
                $this->Simplepie->cachelocation = CACHE . 'simplepie' . DS;

                /**
                 * Set a variable with the returned data from the component
                 */
                $feeddata = $this->Simplepie->feed();

                /**
                 * Pass the data to the view
                 */
                $this->set('feeddata',$feeddata);

    }
}
?>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to