I have a flashy page with image rotators in the front end for the clients.
For back-end I want to have different layout. Can i have multiple layout?
A little hint would be appreciable
I have a flashy page with image rotators in the front end for the clients.
For back-end I want to have different layout. Can i have multiple layout?
A little hint would be appreciable
try
It will switch layout to layoutName.phtml in your module's view/scripts folder ;)
This is wrong. The line:
should be
extends Zend_Controller_Plugin_Abstract
. Otherwise, you'll get an error concerningmvcSuccessfulActionOnly
.I create a layout plugin, to switch layouts when a non-default module is called:
Then in my Bootstrap, I do this:
The non-default layouts go inside a folder named after the module, so my directory structure looks like this:
Yes, you can have multiple layouts though switching them based on the request is not so straight forward.
I've had to do this enough times that I ended up developing a controller action helper and application resource plugin that you're free to use or take inspiration from.
ModuleLayout Application Resource Plugin
ModuleLayoutLoader Controller Action Helper