Hello there
I'm trying to make a navigation menu with jquery dropotron library, and I'd like show the down arrow only in top level items. This is my code in macros.html.twig:
{% macro nav_loop(page) %}
{% import _self as macros %}
{% for p in page.children.visible %}
{% set dropdown_angle_down = "submenu fa-angle-down" %}
<li>
<a {% if p.routable != false %}href="{{ p.url }}"{% else %}{% endif %}{% if p.children.visible.count > 0 %} class="{{ dropdown_angle_down }}"{% else %}{% endif %}>
{{ p.menu }}
</a>
{% if p.children.visible.count > 0 %}
<ul>
{{ macros.nav_loop(p) }}
</ul>
{% endif %}
</li>
{% endfor %}
{% endmacro %}
With this code, the down arrow is applied to all pages with children, but I don't know all options of page collections to limit, in this case, a style class to top level pages.
Can anyone help me to get this?
Thanks.
