Set custom class name for active li element#5650
Conversation
Add ability to set custom class name for active "li" element in menu.
Example:
echo $this->navigation('navigation')->menu()
->setUlClass('uk-navbar-nav uk-hidden-small')
->setLiActiveClass('uk-active')
->setMaxDepth(0)
->setRenderInvisible(false);
|
There are some problems:
Please look at ZF1 for a complete implementation: I think we should grab the implementation from version 1. |
There was a problem hiding this comment.
@samsonasik
At this point the "CS police" is not needed! Because the entire implementation from sopinorg is bad.
|
@froschdesign @samsonasik thanks for advice! I have added fixes to Menu.php. |
Set custom class name for active li element
- including test asset files often results in additional whitespace at end of string; updated assertion to trim() first.
|
Merged to develop for release with 2.3.0. |
|
working on a fix with tests... |
|
|
|
Well it is debatable for sure, but after all it's protected, not private. I'll try and work on a fix anyway. |
fix compatibility with zendframework/zendframework#5650
…ch-1 Set custom class name for active li element
- including test asset files often results in additional whitespace at end of string; updated assertion to trim() first.
Add ability to set custom class name for active "li" element in menu.
Example:
echo $this->navigation('navigation')->menu()
->setUlClass('uk-navbar-nav uk-hidden-small')
->setLiActiveClass('uk-active')
->setMaxDepth(0)
->setRenderInvisible(false);