Note that there are some explanatory texts on larger screens.

plurals
  1. POZend Frontpage calling several modules
    text
    copied!<p>I'm kinda upset for not being able to figure how to do something so simple.</p> <p>First steps using Zend and so I'm trying to achieve something like CMS do, for example:</p> <ul> <li>Having a layout, defining placeholders, like left, right, center.</li> <li>then i could have a menu controller and I'll load it in left, a date picker in right etc.</li> </ul> <p>My approach was defining a layout.phtml</p> <pre><code>&lt;?php /* @var $this Zend_View */ $this-&gt;headMeta()-&gt;appendHttpEquiv('Content-Type', 'text/html;charset=utf-8'); $this-&gt;headTitle()-&gt;setSeparator(' - '); $this-&gt;headTitle('Something'); ?&gt; &lt;?php echo $this-&gt;doctype() ?&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;?php echo $this-&gt;headMeta() ?&gt; &lt;?php echo $this-&gt;headTitle() ?&gt; &lt;?php echo $this-&gt;headScript() ?&gt; &lt;?php echo $this-&gt;headStyle() ?&gt; &lt;/head&gt; &lt;body&gt; &lt;?php echo $this-&gt;placeholder('top') ?&gt; &lt;div id="main"&gt; &lt;div id="content"&gt; &lt;?php echo $this-&gt;layout()-&gt;content ?&gt; &lt;/div&gt; &lt;?php echo $this-&gt;placeholder('footer') ?&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Well now when i go to the page it calls the IndexController. And the content from Index will be rendered in <code>$this-&gt;layout()-&gt;content</code> right?</p> <p>How do i call the other items to render in the other placeholders?</p> <p>For example:</p> <p>If i use the init method in the controller to connect to database and fetch the stuff needed to figure out which stuff to render in which placeholder I'd have to repeat that in all the other controllers.</p> <p>What are the available approaches for this?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload