dmitrybelyakov wrote:
The Layout is the actually the template of my webpages with a main content
area that is controlled by
module controllers. Besides the main content area it may have some other
included areas which may be
simple included views, or rather complex like partials or other custom view
helpers. (This isn't a paradigm misuse, is it?)
...


You may agree that this is better done in DRY mode, where you create a
helper/widget, and then just skin it with your views (tempates) and have it
all included in the final layout which is as you stated the final assembling
point of all other sections. You can imagine all the examples / use cases
for that.

So as you see i'm not using partials as a layout for everything. But try try
to implement a rather common thing. Using action stack is not an option for
the well-known reason of performance.

I think what you are looking for is named capture regions. You layout all your static layout in the layout.phtml file (or whatever your name for the layout file is). Then in your views you use named placeholders (capture sections) for the content you want to insert in sections. In your layout you would echo out those captured sections where they belong. This lets the view change the content and layout does what it is supposed to do. For a reference on placeholders and captures look here http://framework.zend.com/manual/en/zend.view.helpers.html#zend.view.helpers.initial.placeholder.capture


Reply via email to