EvanDotPro/EdpModuleLayouts

Amend Read Me

blutowers opened this issue · 4 comments

I implemented the EdpModuleLayouts as instructed in the readme and didnt receive any errors from zend but the layout for my admin module wasn't being applied.

After reading around I found that i had to add a template_map to the view_manager in the module.config.php.

It would be good if this was added to the readme.

Thanks for the code works great!

I did it like in the Read Me,but the layout wasn't being applied!! could someone please place the proper steps..??

@srikanthkalyan Did you make sure to load the module in your application.config.php?

return array(
    'modules' => array(
        ... ,
        'EdpModuleLayouts'
   )
);

After you've done that you should just be able to follow the instructions here and in the readme. You would add something like this to one of your autoload configs or to a module's module.config.php.

'view_manager' => array(
    'template_map' => array(
        'mymodule/layout' => __DIR__ . '/../view/layout/layout.phtml'
    )
),

'module_layouts' => array(
    'MyModule' => 'mymodule/layout'
)

If I added

'view_manager' => array(
    'template_map' => array(
        'mymodule/layout' => __DIR__ . '/../view/layout/layout.phtml'
    )
),

to my /config/autoload/global.php it does not working, but if I added this to module.config.php it works. How can I set global options for templates, depending by some modules?

@maciejpuchala I'd verify the merged config first: something fishy going on there.