{% macro loop(page, parent_loop) %} {% import _self as macros %} {% if parent_loop|length > 0 %} {% set data_level = parent_loop %} {% else %} {% set data_level = 0 %} {% endif %} {% for p in page.children.visible %} {% set parent_page = p.activeChild ? ' parent' : '' %} {% set current_page = p.active ? ' active' : '' %}