Pages

Tuesday, December 30, 2008

Zend Framework - disable layout and view rendering

I wanted to add rss to a list of items for the todo list application. I used Zend_Feed for creating the rss... But, my application has a layout and a view and I needed to disable layout and view. This solves it:

public function rssAction()
{
#disable layout     
$this->_helper->layout()->disableLayout();

#disable view rendering
$this->_helper->viewRenderer->setNoRender();
//other stuff here
}

No comments: