2012年9月17日星期一

Rob Allen: Module specific layouts in ZF2


Rob Allen has a new post to his site about module-specific layouts in Zend Framework 2 via a module from Evan Coury.



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.


The update is just a simple "module_layouts" setting that lets you specify it based on the module name by giving it a layout path, He explains the script a bit more in the comments and points to this other post for more information about modules handling their own layouts.

没有评论:

发表评论