Mykn’s Blog

Just another WordPress.com weblog

Posts Tagged ‘view’

Disable layout and view renderer in Zend Framework

Posted by mykn trên Tháng Năm 21, 2009

Just a quick tip: I’m working on a project using Zend Framework and needed to switch off layout and view renderer for a specific controller. This can be achieved by adding the following calls to the controller’s preDispatch() method:

public function preDispatch()
{
    $this->_helper->layout()->disableLayout();
    $this->_helper->viewRenderer->setNoRender(true);
}

Posted in Zend_Layout | Tagged: , , , , | Leave a Comment »