Simple Layout using Zend_Layout

intro
Let’s create simple layout using Zend_Layout.You can download the source code of this article from here.

1.Create bootstrap.php
Create the file application/bootstrap.php with the following content.
2.Create Layout
Create the file application/views/scripts/layout.phtml with the following content.

Create the file application/views/scripts/layout/header.phtml with the following content.

Create the file application/views/scripts/layout/nav.phtml with the following content.

Create the file application/views/scripts/layout/footer.phtml with the following content.

Create the file public/css/style.css with the following content.
3.Create Controller and View
Create the file application/controllers/IndexController.php with the following content.

Create the file application/views/scripts/index/index.phtml with the following content.

3.Check
Let’s access your web server and check the screen is laid out.
An example of the screen:
an example of the screen

One Comment

Leave a Reply

Your email address will not be published.