{% from 'snippets/page-detail.jinja' import showDetail with context %} {% from 'snippets/page-front.jinja' import pageFront with context %} {% from 'snippets/page-circuit.jinja' import showCircuit with context %} {%- macro showNestedPages(chapter, documents) -%} {% if chapter['nested']%} {% for nest in documents[chapter['nested']]|sort(attribute='order') %} {% if "published" not in nest or nest["published"] is false %} {{ showDetail(nest, chapter, true) }} {{ showCircuit(nest) }} {% endif %} {% endfor %} {% endif %} {%- endmacro -%}