Disable the View/Layout in Zend Framework

Use the following snippet to disable the view/layout in the Zend Framework:

class IndexController extends Zend_Controller_Action
{
    public function init()
    {
        // Disable render helper and zend Layout
        $this->_helper->viewRenderer->setNoRender();
        $this->_helper->layout()->disableLayout();
    }
}
Monday, April 26th, 2010 Zend Framework

Leave a Reply

You must be logged in to post a comment.

[ad code=1 align=center]