Module specific layouts in ZF2
If you need different layout scripts to be rendered for different modules in Zend Framework 2, then Evan Coury has made this extremely easy. His new module EdpModuleLayouts is just the ticket!
Once installed, you simply have to add a new array to a config file in the config/autoload folder with the following in it:
'module_layouts' => array(
'Application' => 'layout/application',
'ZfcUser' => 'layout/user',
i.e. you provide a list of the module name against the layout script to use.
What could be easier?
For information on how this works, Evan's post explains more.