<matthew@zend.com> wrote:
>> So what do you suggest? Should I just have everything in a large
>> partial? That's a little frustrating because it could become quite
>> large.
>
> It depends on how you're using partials. I see a lot of people doing the
> following:
>
> <?= $this->partial('foo.phtml') ?>
>
> What's wrong with the above? The two primary features of partial() are
> to provide the ability to render view scripts from another module, and
> to provide a protected variable scope. If you're not doing either of
> these things, then there's no reason to use it over render() -- in fact,
> it's *better* to use render() in such a case, as it will be faster.
Awesome. I must have missed render() in the docs. I guess I need to
do a little RTFM.
Thanks,
-=Dan
没有评论:
发表评论