Multi layouts for Zend Framework


1. Create a directory \ templates as shown below:
2. Create index.phtml file in the folder \application\templates\admin with the following contents:


 3. Create index.phtml file in the folder \application\templates\default
with the following contents:

 4. Load layout in Admin modules: - Create function init () in
\application\modules\admin\controllers\IndexController.php
with the following contents:

 5. Load layout in Default modules. - Create function init () in
application\modules\default\controllers\IndexController.php
with the following contents:

1 comment:

  1. hướng dẫn mình chèn css,js vào template được không

    ReplyDelete