Monday, January 27, 2014

How to Make Your Module Default in Zend Framework 2

Just make sure you have the proper route to slash (/) and the first in the alphabetical hierarchy of the other modules.

/module/modulename/config/module.config.php

'router' => array(
        'routes' => array(
            'home' => array(
                'type' => 'Zend\Mvc\Router\Http\Literal',
                'options' => array(
                    'route'    => '/', 
                    'defaults' => array(
                        'controller' => 'Account\Controller\Index',
                        'action'     => 'index',
                    ),
                ),
            ),
    ),
);

  • Related Links Widget for Blogspot

No comments: