Advertisement
Guest User

Untitled

a guest
Sep 13th, 2012
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.80 KB | None | 0 0
  1. Module.php
  2.  
  3. public function getServiceConfig()
  4. {
  5.     return array(
  6.         'factories' => array(
  7.             'navigation' => 'Zend\Navigation\Service\DefaultNavigationFactory'
  8.         )
  9.     );
  10. }
  11.  
  12. module.config.php
  13.  
  14. return array(
  15.     'navigation' => array(
  16.         'default' => array(
  17.             'home' => array(
  18.                 'label' => 'Home',
  19.                 'controller' => 'index',
  20.                 'action' => 'index'
  21.             ),
  22.             'contact' => array(
  23.                 'label' => 'Contact',
  24.                 'controller' => 'contact',
  25.                 'action' => 'index'
  26.             ),
  27.         ),
  28.     ),
  29. );
  30.  
  31. layout.phtml
  32.  
  33. <?php echo $this->navigation('navigation')
  34.                 ->menu()
  35.                 ->setMaxDepth(0)
  36.                 ->setRenderInvisible(false) ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement