Thanks for the quick response, I like how all this is sounding :)

On 11-Sep-07, at 2:33 PM, Matthew Weier O'Phinney wrote:

-- Nathan Wright <[EMAIL PROTECTED]> wrote
(on Tuesday, 11 September 2007, 02:20 PM -0700):
Will layouts still render when ViewRenderer::setNoRender(true) has
been called? That's one of the things I like about the ZVE approach--
you don't have to manipulate two helpers every time you want to
disable view rendering.

I'll take that into consideration. As a rule, I'm against such tight
coupling of components, but this one may make sense.

Will Zend_Layout be limited to 1 layout per request?

The default implementation renders the layout during
dispatchLoopShutdown(). However, Zend_Layout itself is simply a class
and can be instantiated as many times as you want -- so you could
theoretically render several layouts in a given request.

At first I was skeptical of Padriac Brady's talk of the controller-
centricity of ZF, but I think he's onto something. Why shouldn't you
be able to override the default layout from within a view script on a
case by case basis? [By calling $this->setLayout('non-default.phtml')
from a view.]

I plan on having a view helper that allows you to access the layout
instance registered with the controller plugin, so yes, you'll be able
to do this. The usage will most likely be:

    $this->layout()->setLayout('non-default');

or something similar (i.e., returning the layout object, and then
allowing you to call methods on it).

Maybe I should be looking at implementing a full  composite view or
something if this sort of use case falls outside  80/20.

Between ZVE and Zend_Layout, you should have everything you need. :-)


On 11-Sep-07, at 12:35 PM, Matthew Weier O'Phinney wrote:

-- Philip G <[EMAIL PROTECTED]> wrote
(on Tuesday, 11 September 2007, 02:25 PM -0500):
On 8/18/07, Matthew Weier O'Phinney <[EMAIL PROTECTED]> wrote:

   -- PotatoBob <[EMAIL PROTECTED]> wrote
   (on Friday, 17 August 2007, 11:33 PM -0700):

I sure hope default module layouts and a setConfig() feature are
added to
zend_layout :(

   Ralph and I were discussing Zend_Layout yesterday. The current
design
   we're looking at would have a default layout, and allow
specifying the
   layout to use either via a setLayout() accessor or as an
argument to a
   render() method.



Just jumping in to put my two cents in -- this is exactly what I'm
looking for (setLayout() option). I originally built a layout
support,
of this exact same model, on top of Zend_View in ZF ~0.6. In my
research  to figure out Zend_View changes, I ran across this post.
I'm
still figuring out what changed in Zend_View, but this is what I'm
looking for. I'm actually rather shocked this option wasn't added
with
1.0.

To be clear, setLayout() will be part of a separate class,
Zend_Layout.
Zend_View will not have any concept of layouts by itself.

Layouts as created in most frameworks are simply views with
placeholders
for content -- in other words, a decorator for an application view.
Zend_Layout will operate in a similar fashion, and register a plugin
with dispatchLoopShutdown() to perform its work.

Layout support was not done for 1.0.0 as we'd only just finalized
things
like integrated view support for controllers (via the ViewRenderer),
and action helpers -- the building blocks on which a layout solution
will be based.

--
Matthew Weier O'Phinney
PHP Developer            | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/


--
Matthew Weier O'Phinney
PHP Developer            | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to