{% load phoxtail_design_tags phoxtail_agent_tags %} {% url 'wagtailadmin_home' as admin_home %} {% for p in pages %} {# on_trail: this node is the active page itself, or one of its ancestors — auto-expanded instead of lazy #} {% with on_trail=p.pk|in_set:active_ancestor_ids %}
{% endwith %} {% empty %} {% if flat %}