zendframework/zf2 — pull request #2720 by goslife (2012-10-10 03:54:33+00:00)
Title: Update library/Zend/View/Helper/Navigation/Menu.php

edit $ulClass to nav for support class nav in bootstrap.js in ZendSkeletonApplication templete and can use navigation('Navigation'); ?> in layout.phtml to use active page.

First: add this code in /module/Haban/config/module.config.php
'service_manager' => array(
'factories' => array(
'Navigation' => 'Zend\Navigation\Service\DefaultNavigationFactory'
),
),

Second: create pages.global.php in path /config/autoload/pages.global.php
array(
'default' => array(
array(
'label' => 'Home',
'module' => 'Application',
'controller' => 'index',
'action' => 'index',
'order' => -100
),
array(
'label' => 'Rent',
'module' => 'Application',
'controller' => 'rent',
'action' => 'index',
),
array(
'label' => 'Advertise',
'module' => 'Application',
'controller' => 'index',
'action' => 'advertise',
),
array(
'label' => 'Contact',
'module' => 'Application',
'controller' => 'index',
'action' => 'contact',
),
),
),
);

Third: paste this code in /module/Application/view/layout/layout.phtml after line

navigation('Navigation')->menu(); ?>

source: http://adam.lundrigan.ca/2012/07/quick-and-dirty-zf2-zend-navigation/