u.kayani wrote:
> 
> I`m surprised this behavior isn`t supported, it is a pretty common
> behavior for menus.
> Yea I agree CSS would be easiest just not very efficient. Maybe i`ll look
> into a customer view helper.
> 
> According to the other poster there is a way to do it. If there is, could
> someone post it.
> 

You'll have to remove not needed menu nodes (containers),
except active,
then render new container.

Something in this mood:

$container = new Zend_Navigation(new Zend_Config_Xml('myNav.xml');
$currentContainer = $container->findOneByUri($this->url());
// (smarter way to get current element is needed)

if ($container->hasPages()) {
  foreach ($container->getPages() as $page) {
  if ($page !== $currentContainer) {
    // $container->remove …
  } 
}

$this->navigation()->menu()->renderMenu($container);

-- 
regards
takeshin

-- 
View this message in context: 
http://www.nabble.com/Zend-Navigation---how-to-render-submenus-for-only-active-item-tp24929449p24943434.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to