How to create a different layout for a module in Zend Framework 2

Hi, this is my first tutorial here and in this tutorial i want to write about how you can create a different layout for a module in Zend Framework 2.

First of all you must go to your module in Zend Framework 2. Then, you must create a layout.phtml file into view/layout folder. In the layout.phtml file you cand add the code for your new layout.

Next, open the config folder and open module.config.php file. In the view_manager array, add this code:

'template_map' => array(

'layout/layout' => __DIR__.'/../view/layout/layout.phtml'

),

You can also watch my video tutorial:









Leave a Comment