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

{$ title $}

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