{% comment %} Top-level subparts (which contain regulation text) {% endcomment %} {% if c.node_type == 'subpart' or c.node_type == 'emptypart' %} {% for section in c.children %} {% with c=section %} {% include "regulations/regulation_text.html" %} {% endwith %} {% endfor %} {% endif %}