{% macro renderDescendantList(descendants, docType, recursed) %} {% if descendants.length %} {% endif %} {% endmacro -%} {%- macro renderDescendants(doc, docType, title='', recursed=true) %} {% set descendants = doc.descendants | filterByPropertyValue('docType', docType) %} {% if descendants.length %}
{% if title %}

{$ title $}

{% endif %} {$ renderDescendantList(descendants, docType, recursed) $}
{% endif %} {% endmacro %}