In case you are still looking for a solution:
class My_Layout_Controller_Plugin_Layout extends Zend_Layout_Controller_Plugin_Layout
{
public function preDispatch(Zend_Controller_Request_Abstract $request)
{
$module = $request->getModuleName();
if ('admin' == $module) {
$this->getLayout()->setLayout($module);
}
}
}
Opel wrote:
I have set up my app directory as follows :
application
---- modules
---- templates
---------default
---------admin
---- models
library
What I am trying to do is use default template for my public view and admin template for the admin module. I need to set my bootstrap up to switch the template for that single "admin" module. This was covered in Padraic Brady's tutorial but seems to have been taken down and I didn't have a copy of the source.
Could anyone advice me how to do this. The searches on forum for answers all seem to be different layouts per module.