hi
if i have 2 layout in my application how can change my default layout to other layout for some controller or action?
hi
if i have 2 layout in my application how can change my default layout to other layout for some controller or action?
Here you go:
$layout = Zend_Layout::getMvcInstance();
$layout->setLayout('otherlayout');
Where otherlayout
is the name of the second layout (otherlayout.phtml in your layouts folder).
robertbasic's answer is correct. You can also do the following inside of a controller action:
$this->_helper->layout->setLayout('otherlayout');