I'd consider writing a postDispatch plugin, so you know what module you're
actually dispatching. Something like:
class My_Controller_Plugin_ModuleLayout extends
Zend_Controller_Plugin_Abstract
{
public function postDispatch(Zend_Controller_Request_Abstract $request)
{
$layout = Zend_Layout::getMvcInstance();
$module = $request->getModuleName();
$layout->setLayout($module);
}
}
Then in your bootstrap you do $front->registerPlugin(new
My_Controller_Plugin_ModuleLayout()).
Of course, you could also do something more specific, e.g. limiting to only
a few layouts and use a switch-case. Endless possibilites. This should also
be a quite portable way of doing things.
Robin
On Wed, Apr 23, 2008 at 8:09 PM, rollockg <
[EMAIL PROTECTED]> wrote:
>
> Is there a way to define in my bootstrap a separate layout path for each
> module?
> --
> View this message in context:
> http://www.nabble.com/Alternate-layouts-by-module-tp16834740p16834740.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>