Re: [fw-general] ZF2: best practice to handle module specific view blocks

2012-08-12 Thread Marco Pivetta
Hi Ralf, I think you could split those into overrideable view scripts and render them... I think the https://github.com/zendframework/zf2/blob/master/library/Zend/View/Helper/RenderToPlaceholder.phpview helper can do this (though I never used it). You could then render my/sidebar/script and

Re: [fw-general] ZF2: best practice to handle module specific view blocks

2012-08-12 Thread Ralf Eggert
Hi Marco, thanks for the hint. I guess the Placeholder View Helper might also be handy for me. http://zf2.readthedocs.org/en/latest/modules/zend.view.helpers.html#placeholder-helper Ok, to output all the placeholder content I can use my layout script. But still I am not sure where to call the

Re: [fw-general] ZF2: best practice to handle module specific view blocks

2012-08-12 Thread Marco Pivetta
You can eventually add a listener (with high priority) to the 'render' event of your application and then operate on the view models you got to do decisions about the layout (such as every request that went through controller X must have twig templates). That's at least how the current

[fw-general] ZF2: best practice to handle module specific view blocks

2012-08-11 Thread Ralf Eggert
Good morning, we all know the situation that we want to handle module specific view blocks. Some examples: - the main menu should be handled by my default module - the user log in box should be handled by my user module and outputed in the sidebar - the last comments box should be handled by