{% macro articles(_articles) %} {% for article in _articles %} {% if article.path %} {% elif article.url %} {% else %} {% endif %} {% for i in range(0, article.depth - 1) %} {% endfor %} {% if article.articles.length > 0 and page.level.indexOf(article.level) == 0 %} {% elif article.articles.length > 0 %} {% endif %} {{ article.title }} {% if article.path or article.url %} {% else %} {% endif %} {% if article.articles.length > 0 and page.level.indexOf(article.level) == 0 %} {{ articles(article.articles) }} {% endif %} {% endfor %} {% endmacro %} {% block book_summary %} {% for part in summary.parts %}
{% if part.title %}

{{ part.title }}

{% endif %}
{{ articles(part.articles) }}
{% endfor %} {% endblock %}