EdpModuleLayouts icon indicating copy to clipboard operation
EdpModuleLayouts copied to clipboard

Amend Read Me

Open blutowers opened this issue 12 years ago • 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!

blutowers avatar Feb 20 '13 16:02 blutowers

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

srikanthkalyan avatar Apr 27 '13 18:04 srikanthkalyan

@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'
)

esheffield-ivantage avatar May 13 '13 14:05 esheffield-ivantage

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 avatar Nov 16 '14 10:11 maciejpuchala

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

Ocramius avatar Nov 22 '14 09:11 Ocramius