Zend Layout and Bootstrapping

Posted by emeraldjava on Stack Overflow See other posts from Stack Overflow or by emeraldjava
Published on 2009-07-26T14:23:43Z Indexed on 2010/04/21 20:03 UTC
Read the original article Hit count: 363

Filed under:
|

So i'm using the standard Zend Layout for my site. I have a number of custom controllers and views, and the content of these pages is displayed, but the details in the head element of the layout.phtml are not shown. Do i need to manually associate the Zend_Layout with each specific controller?. I expected since the layout is loaded via the bootstrap this should be available for free.

My app.ini file has

# layout
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
resources.layout.layout = "layout"
#resources.view[] =

# Views
resources.view.encoding = "UTF-8"
resources.view.basePath = APPLICATION_PATH "/views/"

my layout.phtml

<?php echo $this->doctype() ?>
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
  <?php echo $this->headTitle() ?>
  <?php echo $this->jQuery();?>
</head> 
<!-- application/layouts/scripts/layout.phtml -->
<body>
        <div id="content">
            <?php echo $this->layout()->content ?> 
        </div>
</body>

© Stack Overflow or respective owner

Related posts about zend

Related posts about zend-framework