Sunday, 11 January 2015

Enabling Layout in Zend

Layout in zend
Now that we have created our basic application. Next is to create a layout file. In zend it is very easy through command line. Just go to your command prompt. Than to your project directory and type the following;
Zf enable layout
Zend will enable your layout by adding a folder named layout in the application folder with subfolder scripts and layout.phtml file in it.


Now all you have to do is to create your layout.
I have attached files with the tutorial here;


 just download these two files and replace the layout.phtml file with the one in the layout/scripts/layout.phtml file.
Than add the css and images folder into public directory. That’s it, your layout is done so far. Your project should look like this;

Now open the project in your browser, and it should be like this;


Congratulations you have created  the layout for your project.

No comments:

Post a Comment