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 depending on how the template path resolver is
configured, get different results. It will render
"YourModule/my/sidebar/script.phtml" or
"SomeBasicModule/my/sidebar/script.twig" depending on how you've setup
things.
Anyway, don't think as "Modules" as a way of separating things into
different application portions. They are not a "separate container" in your
app, they're functionality added to it.

Marco Pivetta

http://twitter.com/Ocramius

http://marco-pivetta.com



On 12 August 2012 07:32, Ralf Eggert <[email protected]> wrote:

> 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 my comments module
>   and outputed in the sidebar
>
> Within ZF1 I have a lot of solutions like:
>
> - module specific view helpers which are called by my default
>   layout script
> - module specific plugins which handle Zend_Layout segments
>   with corresponding view scripts
> - use the Action View Helper (argh!)
> - to be continueed...
>
> Are there any best practices for the ZF2 yet how to handle these module
> specific view blocks?
>
> Best regards,
>
> Ralf
>
>
> --
> Ralf Eggert
> Geschäftsführer
>
> Travello GmbH
> An der Eiche 15
> 25421 Pinneberg
>
> Geschäftsführer: Ralf Eggert
> Amtsgericht Pinneberg HRB 6112 PI
>
> Tel: 04101/8529401
> Fax: 04101/8529402
> E-Mail: [email protected]
> Web: http://www.travello.de
>
> --
> List: [email protected]
> Info: http://framework.zend.com/archives
> Unsubscribe: [email protected]
>
>
>

Reply via email to