Skip to content

Commit

Permalink
Add menu level class to menu wrapper.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacerider committed Sep 20, 2016
1 parent 929d744 commit a6dacc5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions templates/menu/menu.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,14 @@
{% if menu_level == 0 %}
<ul>
{% else %}
<ul>
<ul {{ attributes.addClass('level-' ~ menu_level) }}>
{% endif %}
{% for item in items %}
{%
set classes = [
item.is_expanded ? 'expanded',
item.is_collapsed ? 'collapsed',
item.in_active_trail ? 'active-trail',
'level-' ~ menu_level
]
%}
<li{{ item.attributes.addClass(classes) }}>
Expand Down

0 comments on commit a6dacc5

Please sign in to comment.