I am rendering the top-level elements of a Zend Navigation object in one place like this:
echo $this->navigation()->menu()->setMaxDepth(0);
<
I do it this way:
navigation()->menu()->setMaxDepth(0);
// Render 2nd level elements for active element
echo $this->navigation()->menu()
->setOnlyActiveBranch(true)
->setRenderParents(false)
->setMinDepth(1);
?>
but this is not a good solution. Better one for each level as a separate menu:
navigation()->menu()->setMaxDepth(0); ?>
navigation()->menu()->setOnlyActiveBranch(true)->setRenderParents(true)->setMinDepth(1)->setMaxDepth(1); ?>
navigation()->menu()->setOnlyActiveBranch(true)->setRenderParents(false)->setMinDepth(2)->setMaxDepth(2); ?>