{{ loop.key | escape }} {% for subsection in section %} {# Set the name of the current subsection and the template to use to render it. The default template is "subsection.html". #} {% set subsection_name = loop.key %} {% set subsection_template = subsection.template | default("subsection") + ".html" %} {# Iterate over the "repeat" property for this subsection the number of times specified. On each iteration, populate some variables to be made available to the template. #} {% for i in subsection.repeat | default([1]) %} {% include subsection_template %} {% endfor %} {% endfor %}