2008年11月4日星期二

Re: [fw-mvc] Nested Partials

-- Dan Wilson <dan@acucore.com> wrote
(on Tuesday, 04 November 2008, 01:16 PM -0700):
> I'm new to ZF and have just started working with Layouts and Views.
> I'm trying to get a nested partial to work, but it appears to not work
> properly. If I step through it (using Komodo [xdebug]) it appears to
> go into the partial file, but never actually outputs anything.
>
> Do nested partials work and if they do, is there a trick?

Nested partials work, but I'd recommend against them. partial() clones
the view object... and all helpers... and all filters... It's a bit
resource intensive, though relatively performant. I recently tested this
(nested partials) as I was investigating ways to make partial() more
performant (though I ultimately did not come up with anything), so I
know it works.

--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论: