Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Module.php
- public function getServiceConfig()
- {
- return array(
- 'factories' => array(
- 'navigation' => 'Zend\Navigation\Service\DefaultNavigationFactory'
- )
- );
- }
- module.config.php
- return array(
- 'navigation' => array(
- 'default' => array(
- 'home' => array(
- 'label' => 'Home',
- 'controller' => 'index',
- 'action' => 'index'
- ),
- 'contact' => array(
- 'label' => 'Contact',
- 'controller' => 'contact',
- 'action' => 'index'
- ),
- ),
- ),
- );
- layout.phtml
- <?php echo $this->navigation('navigation')
- ->menu()
- ->setMaxDepth(0)
- ->setRenderInvisible(false) ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement