I want to create RSS Feeds with Yii for my website(s). I read this wiki page about creating feeds: http://www.yiiframework.com/wiki/20/how-to-generate-web-feed-for-an-application and some other tips/posts about this topic.
But all of those approaches are assuming that a web site is using one feed only which is not necessarily bound to the models which are displayed/managed at the same time. I would like to create different feed: One for guestbook comments if the user is on the guestbook site, another for latest photos if he is on the photos site and so on.
Following my intuition, I would consider this a new action in the model’s controller. For example a “feed” action in the CommentController (for the guestbook).
The design problem in this case is that actually the controller is already bound to a HTML layout template with the $layout variable, which does not make sense with Feeds.
From a system design point of view, where and how you would implement this? Creating a new Controller managing all feeds or implementing the feed action in the model’s controller? And using Zend_* stuff to generate the feed or using view files just as outputting HTML as well?
Thanks for your ideas and input,