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

Issue Type: Improvement Created: 2010-03-26T00:41:24.000+0000 Last Updated: 2013-01-08T09:26:49.000+0000 Status: Resolved Fix version(s): - 1.12.2 (25/Feb/13)

Reporter: Ken Chou (kenchou77) Assignee: Frank Brückner (frosch) Tags: - Zend_Navigation

  • After1.12.0
  • FixForZF1.12.1
  • state:patch-ready-for-review
  • zf-crteam-padraic
  • zf-crteam-priority
  • zf-crteam-review

Related issues: Attachments: - Menu.php.patch


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

class of active item is hard-code...


Posted by Kai Uwe (kaiuwe) on 2011-02-15T01:37:43.000+0000

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

Posted by Frank Brückner (frosch) on 2011-09-05T16:26:17.000+0000

Patch and unit test added.

Posted by Adam Lundrigan (adamlundrigan) on 2012-06-02T02:45:38.000+0000

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!

Posted by Frank Brückner (frosch) on 2012-06-04T06:05:23.000+0000

I will check this and create a new patch.

Posted by Frank Brückner (frosch) on 2012-06-15T14:58:00.000+0000

New patch. (Rebase)

Posted by Rob Allen (rob) on 2012-11-07T20:56:54.000+0000

Unfortunately, patch fails to apply cleanly.

Posted by Frank Brückner (frosch) on 2012-11-08T17:10:01.000+0000

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

Posted by Frank Brückner (frosch) on 2013-01-08T09:26:49.000+0000

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

Have you found an issue?

See the Overview section for more details.


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

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