You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe this is a mistake. Knp uses <li> as the current node and <ul> as children nodes. Which make sense when you render a list like this
<li> <!-- current node -->
<a href="#">This is a menu Item</a>
<ul> <!-- children node -->
<li><a hrtef="#">Submenu1</a></li>
<li><a hrtef="#">Submenu2</a></li>
</ul>
</li>
When rendering a full menu, the topmost element is a <ul>, and therefore uses "children node" attributes.
However, by overriding the render() method and using getAttributes() both on <ul> and <li> tags, we're making setChildrenAttribute() pointless and we limit the flexibility provided in the default renderer.
The text was updated successfully, but these errors were encountered:
The ListRenderer mentions
I believe this is a mistake. Knp uses
<li>
as the current node and<ul>
as children nodes. Which make sense when you render a list like thisWhen rendering a full menu, the topmost element is a
<ul>
, and therefore uses "children node" attributes.However, by overriding the
render()
method and usinggetAttributes()
both on<ul>
and<li>
tags, we're makingsetChildrenAttribute()
pointless and we limit the flexibility provided in the default renderer.The text was updated successfully, but these errors were encountered: