On Feb 6, 2008 3:15 PM, Matthew Weier O'Phinney <[EMAIL PROTECTED]> wrote:
>
> While I can understand what you're saying, I feel this is coming too
> late; Zend_Layout, while it hasn't been officially released, *has* been
> in core since mid-November, and there have been tutorials and code
> written against them.

Fair enough. My apologies for not testing it sooner. I was waiting for
more of a solidified release before playing around with Zend_Layout.

>
> Except that Zend_View and Zend_Layout are unaware of Zend_Controller and
> its family -- they have no concept of the class calling them.
>
> The seeming awareness that Zend_View has is due to injection from the
> ViewRenderer, which *does* have knowledge of the current module,
> controller, and action, and injects a path to the current controller's
> view scripts into the view object based on that information.
>
> Zend_Layout is *supposed* to be unaware of the individual controllers
> because it is supposed to wrap whatever content has already been
> rendered by whatever controllers and actions that have done so.
>

I completely get the unawareness of the individual controllers. I get
it; I agree with it. However, the problem comes into play with a
module based MVC site. I think Zend_Layout needs to be a little
intelligent as to what /module/ a user is in. There are plenty of
perfectly valid examples as to why different modules will need
different layouts (think admin vs frontend).

Zend_View knows what module, controller and action it's using (even if
it's just a static path passed to it).
Zend_Layout needs to know what module.

However, I will concede on this as I am late in giving my feedback on
Zend_Layout and its functionality. This limitation can be worked
around by defining the Zend_Layout (eg "startMvc()") within a
Controller Plugin, for which I am doing. Maybe this can be added into
the next release of Zend_Layout?

-- 
Philip
[EMAIL PROTECTED]
http://www.gpcentre.net/

Reply via email to