Tuesday 9 June 2015

Zend framework Disable the layout and Change the Layout in ZF1

 Zend framework Disable the layout and Change the Layout in ZF1


How to change layout from controller's action?
$this->_helper->layout->setLayout('newLayout');


How to change layout from view file?
$this->layout()->setLayout('newLayout'); 




How to disable the layout from controller's action?
$this->_helper->layout()->disableLayout(); 


How to disable the layout from view file?
$this->layout()->disableLayout(); 


How to disable the view from controller's action?
$this->_helper->viewRenderer->setNoRender(true);