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
InjectTemplateListener (
https://github.com/zendframework/zf2/blob/master/library/Zend/Mvc/View/Http/InjectTemplateListener.php)
works.
That is probably the best way of doing such decisions based on the name of
the picked controller.

Marco Pivetta

http://twitter.com/Ocramius

http://marco-pivetta.com



On 12 August 2012 21:11, Ralf Eggert <r.egg...@travello.de> wrote:

> 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 placeholder helper for setting
> the stuff.
>
> - Within an action controller?
> - Within a plugin?
> - Within my module class?
>
> Best regards,
>
> Ralf
>
> --
> List: fw-general@lists.zend.com
> Info: http://framework.zend.com/archives
> Unsubscribe: fw-general-unsubscr...@lists.zend.com
>
>
>

Reply via email to