ZF-7341: Zend_Navigation does not mark children of active pages.

Issue Type: Bug Created: 2009-07-21T14:02:28.000+0000 Last Updated: 2009-07-23T05:31:30.000+0000 Status: Resolved Fix version(s): - 1.9.0 (31/Jul/09)

Reporter: Ryan Mauger (bittarman) Assignee: Robin Skoglund (robinsk) Tags: - Zend_Navigation

Related issues: Attachments:


When creating a menu with Zend_Navigation, it is currently difficult to simply create a menu of items below the current active page, when the minDepth is greater than the depth of the active page.

<pre class="highlight">
echo $this->navigation()->menu()->renderMenu(null, array(
    'minDepth' => 1,
    'maxDepth' => 1,
    'ulClass' => 'navigation white',
    'onlyActiveBranch' => true,
    'renderParents' => false));

This should render a menu of the child pages of the top level of the container, but currently if the active page is one of the root nodes, it will render nothing.


Posted by Robin Skoglund (robinsk) on 2009-07-21T14:10:22.000+0000

The fix for this requires modifications to Zend_View_Helper_Menu::_renderDeepestMenu(). Unfortunately, this would break BC, because the rendered output would be different for calls to renderMenu() if minDepth/maxDepth is set.

However, it is a bug, and the fix would most likely make the helper behave more like people expect it would. How do we proceed?

Posted by Robin Skoglund (robinsk) on 2009-07-21T14:12:03.000+0000

Edited code snippet to make it more readable.

Posted by Dolf Schimmel (Freeaqingme) (freak) on 2009-07-21T14:15:33.000+0000

Fix it for 1.9, and put it in capitals in the migration guide?

Posted by Benjamin Eberlei (beberlei) on 2009-07-21T14:59:37.000+0000

its a bug, we cant provide backwards compabitilty for bugs :)

Posted by Matthew Weier O'Phinney (matthew) on 2009-07-21T18:35:23.000+0000

Agreed with Benjamin and Dolf. The current behavior is considered buggy, so we break BC slightly. All such breaks should include a "migration" chapter in the relevant documentation indicating what the break is, why it occurred, and how to update the code.

Robin -- this would not be considered something that falls under feature freeze; if you cannot get it in by feature freeze tomorrow, you can still merge it to the release branch prior to the RC.

Posted by Robin Skoglund (robinsk) on 2009-07-22T06:01:25.000+0000

I had a feeling that was the case. Good to know. I'll have it fixed before the weekend :)

Posted by Robin Skoglund (robinsk) on 2009-07-23T05:31:30.000+0000

Fixed in r16981.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.