{% 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']%}
        <pre>{{ documents[chapter['nested']]|length }} </pre>
        {% for nest in documents[chapter['nested']] %}
            {{ showDetail(nest, chapter) }}
            {{ showCircuit(nest) }}
        {% endfor %}
    {% endif %}
{%- endmacro -%}