{% macro renderRecursive(context, items, parent = null, level = 1) %} {% for comment in items %} {% if level == 1 %} {% set paddingLeft = 0 %} {% else %} {% set paddingLeft = 42 %} {% endif %} {% if comment.status == 'pending' %}
{% partial '@_single' comment=comment %}
{% else %}
{% partial '@_single' comment=comment %} {% if context.showCommentsHierarchical and comment.children %} {{ _self.renderRecursive(context, comment.children, comment, level + 1) }} {% endif %}
{% endif %} {% endfor %} {% endmacro %} {{ _self.renderRecursive(_context, comments) }} {% if comments.lastPage > 1 %} {% partial '@_pagination' pagination=comments %} {% endif %}