Good to see a heap of work has been done with Zend_Layout and the
Zend_View_Enhanced helpers, in particular the Partials.
For a particular site I'm working on, we have a set of "boxes" that
can reoccur multiple times in a single page, all these boxes have the
same basic layout:
<div class="box">
<div class="box_head">
<h1><?= $title ?></h1>
<ul class="nav">
<?= $this->makeNav ($nav) ?>
</ul>
</div>
<div class="content">
<?= $this->render ($content) ?>
</div>
</div>
So currently I have to reproduce this basic layout for each separate
box on the page. Ideally what I'd like to do would be the following:
<?= $this->box ($title, $nav, $content, $otherVars);
This View helper would render the box from a separate predefined view
script then go into another view script where the content code is
actually contained. I guess essentially this would be some sort of
proxy for the Partial view helper anyway. $otherVars would be a set of
view variables that could be passed on to the content view script.
Does anyone have any suggestions for how best to implement this using
partials and perhaps layouts?
--
Mathew Byrne