« Return to Thread: layout content not rendering

Re: layout content not rendering

by bfoust :: Rate this Message:

Reply to Author | View in Thread


Greg Donald-3 wrote:
In my bootstrap I'm trying to setup a default layout:

$layout = Zend_Layout::startMvc( array( 'layout'     => 'application',
                                        'layoutPath' =>
"$dirname/../views/layouts",
                                        'contentKey' => 'CONTENT' ) );

I'm not exactly sure what to do with that new $layout variable however.
If you just leave the contentKey unspecified, it defaults to "content", so you might find it less confusing to just leave everything set to the defaults by:

1. Using only:

    Zend_Layout::startMvc();

2. Now your default layout for each module is:

      <modulename>/views/scripts/layout.phtml

3. and the default view that gets rendered into $this->layout()->content  is still:

      <modulename>/views/scripts/index/index.phtml

 « Return to Thread: layout content not rendering