Using Zend_Layout
Basic usage of Zend_Layout is fairly trivial. Assuming you're using
Zend_Application already, you can simply provide some configuration
options and create a layout view script.
Layout Configuration
The recommended location of layouts is in a "layouts/scripts/"
subdirectory of your application:
To initialize Zend_Layout, add the following to your
configuration file ("application/configs/application.ini"):
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).
Create a Layout Script
Now that you have your configuration in place, you need to create your layout script.
First, make sure that you've created the
"application/layouts/scripts" directory; then,
open an editor, and create the markup for your layout. Layout scripts are simply view
scripts, with some slight differences.
My Site
layout()->content ?>