PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Layout Configuration

The recommended location of layouts is in a "layouts/scripts/" subdirectory of your application:

application
|-- Bootstrap.php
|-- configs
|   `-- application.ini
|-- controllers
|-- layouts
|   `-- scripts
|       |-- layout.phtml

To initialize Zend_Layout, add the following to your configuration file ("application/configs/application.ini"):

resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
resources.layout.layout = "layout"

The first line indicates where to look for layout scripts; the second line gives the name of the layout to use, minus the view script extension (which is assumed to be ".phtml" by default).

Zend Framework