You can also use the code in action functions to change a independent
action's layout file.
public function indexAction()
{
Zend_Layout::getMvcInstance()->setLayout('some_special_layout');
...
}
If you want to, or need a different layout file for one action vs another.
Also, you can also disable the layout if you don't want it at all:
Zend_Layout::getMvcInstance()->disableLayout();
________________________________
From: Jurian Sluiman [mailto:[email protected]]
Sent: Tuesday, November 03, 2009 12:10 PM
To: [email protected]
Subject: Re: [fw-general] Change the layout from module bootstrap
Place an init method inside the class like this or something:
>public function _initLayout ()
>{
> Zend_Layout::getMvcInstance()->setLayout($myLayoutName)
>}
Regards, Jurian
--
Jurian Sluiman
Soflomo.com
Op Tuesday 03 November 2009 17:25:17 schreef Simeon Goranov:
> Hello,
> I've got a module bootstrap file Admin_Bootstrap where the module is
> "admin". I'm wondering how to change the default layout, which in my
> case is layout.phtml only for the admin module. In my opinion I have to
> do it into the bootstrap file, because in this way the change will
> affect all of the module controllers. Do you have any idea how to solve
> the problem ?
>
> Regards,
> S.G.