-
Notifications
You must be signed in to change notification settings - Fork 2.5k
View\Helper\Navigation\Menu: add flag to set page class to <li> #4298
Conversation
I guess you should work around naming like: aClass (anchor), liClass(list). And functions: addAClass, addLiCalss, set[...]. Also you could put in them some default class(may take them from boostrap css). |
No default values! If you use the "Foundation" framework, the class names from "Bootstrap" are wrong. |
* | ||
* @var bool | ||
*/ | ||
protected $addPageClassToLi = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the verbiage "page"? Why not simply $addClassToLi
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, expand "Li" to "ListItem"; abbreviations without context are often difficult to understand when just glancing through code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@weierophinney
It is the old from version 1.12.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@weierophinney
"ListItem" 👍
Looks sane -- make the changes requested, and I'll merge for 2.2.0. |
👍 |
View\Helper\Navigation\Menu: add flag to set page class to <li> Conflicts: library/Zend/View/Helper/Navigation/Menu.php
Merged to develop for release with 2.2.0. |
…/addPageClassToLi View\Helper\Navigation\Menu: add flag to set page class to <li> Conflicts: library/Zend/View/Helper/Navigation/Menu.php
- Per php-cs-fixer
In ZF1 there was the possibility to put the page class to
<li>
instead of internal<a>
:https://github.com/zendframework/zf1/blob/release-1.12.3/library/Zend/View/Helper/Navigation/Menu.php#L103-L108
Before:
After:
This behaviour is necessary to correctly style the internal
<ul>
of a specific<a>
page.Tests pass, I'll rebase when global test fail will be fixed.