I am trying to use a main navigation in combination with a submenu for more specific navigating.
In my layout I am calling the view helper like this:
$this->navigation('main_navigation')->menu()
and in my view I am calling it like this:
$this->navigation('sub_navigation')->menu()
The problem is that whenever I call the navigation()
view helper a more than once, it just outputs the second one in both places. In other words, it's printing the subnav for both the main nav and the subnav menus.
My merged config looks like this:
'navigation' => array(
'main' => array(
'home' => array(
'label' => 'Home',
'route' => 'myroute',
),
'somepage' => array(
'label' => 'Me',
'route' => 'somepage'
)
),
'sub' => array(
'test' => array(
'label' => 'Test',
'route' => 'myroute',
'action' => 'test'
),
'other-test' => array(
'label' => 'Other Test',
'route' => 'myroute',
'action' => 'other-test'
)
)
)
How do I use the navigation
view helper so that it will print the correct menu for each call?