{% if parent_html is undefined %} {% set parent_page = currentpage %} {% set parent_html = currentpage.html %} {% else %} {% set parent_page = pages|selectattr('html', 'defined_and_equalto', parent_html)|list|first %} {% endif %} {% if depth is undefined %} {% set depth = 5 %} {% endif %} {% if count is undefined %} {# count controls how many direct children to print at each level #} {% set count = 9999 %} {% endif %} {% if show_blurbs is undefined %} {% set show_blurbs = False %} {% endif %} {% macro print_children(parent, indent_level, depth_limit, count_limit) %} {% set printed_next_levels = [] %} {% set ns=namespace(count_printed = 0) %} {% for child in parent.children %} {% if child.nav_omit is defined and child.nav_omit %}{# skip pages that are omitted from navigation #} {% elif ns.count_printed < count_limit %}
{{child.blurb}}
{% endif %}