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


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.

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.


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?

Edited code snippet to make it more readable.

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

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

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.

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

Fixed in r16981.