i have a bare bones zf2 application and i have 2 modules (Users and Album).
They both have their own layouts but i want to use the layout from Album for the Users, just to keep them a bit more consistent.
Im not sure what is the best way to delegate what layout a module should use.. from the controller __contruct, or on each individual action or in the module.config.php.
maybe here:
'template_map' => array(
'layout/top_nav' => __DIR__ . '/../view/layout/top_nav.phtml',
'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
^^ probably i should set this path to the layout i want to use ^^
'posts/index/index' => __DIR__ . '/../view/posts/index/index.phtml',
'error/404' => __DIR__ . '/../view/error/404.phtml',
'error/index' => __DIR__ . '/../view/error/index.phtml',
),
any ideas? maybe the best practices?
thanks
edit: i just did this and it worked:
'layout/layout' => __DIR__ . '/../../album /view/layout/layout.phtml',
but i'm still not sure if this is best practice.
maybe i can setup multiple template_map
arrays and use them in the User
controller, in my case