{% macro nav_loop(page) %} {% import _self as macros %} {% for p in page.children.visible %} {% set active_page = (p.active or p.activeChild) ? 'active' : '' %} {% set has_children = p.children.visible.count > 0 %} {% if p.header.menu_icon %}{% endif %} {{ p.menu }} {% if has_children %} {% endif %} {% endfor %} {% endmacro %}