|
8 | 8 | {%- endfor -%} |
9 | 9 | {% endmacro %} |
10 | 10 |
|
| 11 | +{% from _self import attributes as attributes %} |
| 12 | + |
11 | 13 | {% block compressed_root %} |
12 | 14 | {% spaceless %} |
13 | 15 | {{ block('root') }} |
|
63 | 65 |
|
64 | 66 | {% set listAttributes = listAttributes|merge({'class': (listAttributes.class|default('') ~ ' ' ~ listClass)|trim}) %} |
65 | 67 |
|
66 | | - <ul{{ _self.attributes(listAttributes) }}> |
| 68 | + <ul{{ attributes(listAttributes) }}> |
67 | 69 | {{ block('children') }} |
68 | 70 | </ul> |
69 | 71 | {% endif %} |
|
73 | 75 | {% spaceless %} |
74 | 76 | {% if item.hasChildren and options.depth is not same as (0) and ((item.extras.dropdown is not defined and item.displayChildren is same as (true) or item.extras.dropdown is defined and item.extras.dropdown is same as (true) and item.displayChildren is same as (true))) %} |
75 | 77 | {% set listAttributes = listAttributes|merge({'class': (listAttributes.class|default('') ~ ' dropdown-menu')|trim}) %} |
76 | | - <ul{{ _self.attributes(listAttributes) }}> |
| 78 | + <ul{{ attributes(listAttributes) }}> |
77 | 79 | {{ block('children') }} |
78 | 80 | </ul> |
79 | 81 | {% endif %} |
|
83 | 85 | {% block listList %} |
84 | 86 | {% spaceless %} |
85 | 87 | {% if item.hasChildren and options.depth is not same as (0) and item.displayChildren %} |
86 | | - <ul{{ _self.attributes(listAttributes) }}> |
| 88 | + <ul{{ attributes(listAttributes) }}> |
87 | 89 | {{ block('children') }} |
88 | 90 | </ul> |
89 | 91 | {% endif %} |
|
140 | 142 | {%- set attributes = attributes|merge({'class': classes|join(' ')}) %} |
141 | 143 | {%- endif %} |
142 | 144 | {# displaying the item #} |
143 | | - <li{{ _self.attributes(attributes) }}> |
| 145 | + <li{{ attributes(attributes) }}> |
144 | 146 | {%- if attributes.divider is defined and attributes.divider is not empty %} |
145 | 147 | {%- elseif item.hasChildren and options.style is defined and options.style in ['tabs', 'justified-tabs', 'pills', 'justified-pills', 'navbar', 'navbar-right', 'navbar_justified'] and options.currentDepth is same as (1) and ((item.extras.dropdown is not defined and item.displayChildren is same as (true) or item.extras.dropdown is defined and item.extras.dropdown is same as (true) and item.displayChildren is same as (true))) %} |
146 | 148 | {{ block('dropdownElement') }} |
|
168 | 170 | {% endif %} |
169 | 171 | {% endblock %} |
170 | 172 |
|
171 | | -{% block linkElement %}<a href="{{ item.uri }}"{{ _self.attributes(item.linkAttributes) }}>{{ block('label') }}</a>{% endblock %} |
| 173 | +{% block linkElement %}<a href="{{ item.uri }}"{{ attributes(item.linkAttributes) }}>{{ block('label') }}</a>{% endblock %} |
172 | 174 |
|
173 | 175 | {% block dropdownElement %} |
174 | 176 | {% spaceless %} |
175 | 177 | {% set labelAttributes = item.labelAttributes %} |
176 | 178 | {% set labelAttributes = labelAttributes|merge({'class': (labelAttributes.class|default('') ~ ' dropdown-toggle')|trim}) %} |
177 | 179 | {% set labelAttributes = labelAttributes|merge({'data-toggle': 'dropdown'}) %} |
178 | | - <a href="#"{{ _self.attributes(labelAttributes) }}>{{ block('label') }} <b class="caret"></b></a> |
| 180 | + <a href="#"{{ attributes(labelAttributes) }}>{{ block('label') }} <b class="caret"></b></a> |
179 | 181 | {% endspaceless %} |
180 | 182 | {% endblock dropdownElement %} |
181 | 183 |
|
|
184 | 186 | {% endspaceless %} |
185 | 187 | {% endblock dividerElement %} |
186 | 188 |
|
187 | | -{% block spanElement %}<span{{ _self.attributes(item.labelAttributes) }}>{{ block('label') }}</span>{% endblock %} |
| 189 | +{% block spanElement %}<span{{ attributes(item.labelAttributes) }}>{{ block('label') }}</span>{% endblock %} |
188 | 190 |
|
189 | 191 | {% block label %}{% if options.allow_safe_labels and item.getExtra('safe_label', false) %}{{ item.label|raw|parse_icons }}{% else %}{{ item.label|parse_icons }}{% endif %}{% endblock %} |
0 commit comments