Let's say, that we have:
$pages = array(
array(
'controller' => 'controller1',
'label' => 'Label1',
),
array (
'controller' => 'controller2',
'label' => 'Label2'
),
);
$container = new Zend_Navigation($pages);
When user clicks Label1, controller1/index action is rendered and Label1 becomes active state - everything is ok. On this page I have many links, such as: controller1/action1, controller1/action2, etc When one of these links is clicked, Label1 looses active state.
I understand, that I can add all sub-pages into Zend_Navigation, but there are plenty of these pages and I never need it anywhere for navigation, so, I'd prefer to have something like:
public function init()
{
$this->view->navigation()-> ... get item by label ... -> setActive();
}
inside controller1. Is it possible?