ZF-9543: class="active" is hard-code


341: $liClass = $subPage->isActive(true) ? ' class="active"' : ''; 342: $html .= $indent . ' <li' . $liClass . '>' . self::EOL;

class of active item is hard-code...


The patch should include the following points:

  • Zend_View_Helper_Navigation_Menu gets a new property "activeClass" and getter and setter for this property
  • Zend_View_Helper_Navigation_Menu::_renderMenu and Zend_View_Helper_Navigation_Menu::_renderDeepestMenu uses the new property

Patch and unit test added.

Fix patch does not attach cleanly against trunk, likely due to another Zend_View_Helper_Navigation patch i've applied. Could you fix it up? Thanks!

I will check this and create a new patch.

New patch. (Rebase)

Unfortunately, patch fails to apply cleanly.

I will add a new patch. The current patch is old.

Fixed on trunk (25194) and release-1.12 (25195)