i do have a problem regarding rendering the navigation in zf2. I have not found anybody else having this issue. But maybe you have a clue.
Althought everything seems to be configured right, due to the fact that everything does work, rendering zend navigation does not mark the active route with class="active".
This is part of my module.config.php:
'service_manager' => array(
'factories' => array(
'app_navigation' => 'Zend\Navigation\Service\DefaultNavigationFactory',
'User\Acl\Service' => 'User\Acl\ServiceFactory',
'User\Auth\Service' => 'User\Authentication\ServiceFactory',
),
),
//global config key for all navigation configurations
'navigation' => array(
//name of the DefaultNavigation created by DefaultNavigationFactory
'default' => array(
//config of first page
'welcome' => array(
'label' => 'Home',
'route' => 'welcome',
'controller' => 'People\Controller\PeopleController',
'action' => 'welcome',
'type' => 'uri',
'uri' => '/welcome',
'module' => 'TheGlobalDatabase',
),
...
This is the route:
'router' => array(
'routes' => array(
'welcome' => array(
'type' => 'segment',
'options' => array(
'route' => '/welcome',
'defaults' => array(
'controller' => 'People\Controller\People',
'action' => 'welcome',
),
),
),
I do echo the navigation in the layout like this:
echo $this->navigation()->menu()->renderMenu('app_navigation',array('ulClass'=>'nav navbar-nav welcome'));
Maybe you have a hint, what else to check.
Thank you all!