{% for section in sections %} {# Set the name of the current section and the template to use to render it. The default template is "section.html". #} {% set section_name = loop.key %} {% set section_template = section.template | default("section") + ".html" %} {# If we're rendering the special-case "about" section, ensure the template is set to use the "section.about.html" template. #} {% if section_name == "about" %} {% set section_template = "section.about.html" %} {% endif %} {% include section_template %} {% endfor %}