How to create a modular website with a Zend card. I have pages in db, each page is represented as a url. Each page has the contents of 1toN. Each content has a controller, action and position (+ others are now not important columns). Thus, one request represents one page and several contents (several actions). How can I create all the actions before exiting? I would like to have a layout, for example, the example below, where the content is placed in containers (actions are performed before the layout is printed).
<div id="left">
<?= $this->layout()->left_container ?>
</div>
<div id="center">
<?= $this->layout()->center_container ?>
</div>
<div id="right">
<?= $this->layout()->right_container ?>
</div>
So far I have called actions from the layout view, but I do not like this approach:
foreach ($contents as $item) {
echo $this->action($item['action'], $item['controller'], null, array('content' => $item));
}
Thanks.
ps
adepretis , , , , . , ? , ...- > setResponseSegment, , .
p.s. # 2
, . , , , .