How can i disable layout in zend framwork?
This topics show you, how you can disable layout
to disable layout use this line:
$this->_helper->layout->disableLayout();
This topics show you, how you can disable layout
to disable layout use this line:
$this->_helper->layout->disableLayout();
This topics show you, how you can change a default layout
to change layout use this line:
$this->_helper->layout->setLayout('admin');
This example show you how we can check if a use logged in
$auth = Zend_Auth::getInstance();
if (!$auth->hasIdentity()) {
if ('login' != $this->getRequest()->getActionName()) {
$this->_helper->getHelper('Redirector')->setGotoRoute(array(), 'MYROUTE');
}
}