{% load i18n %}{% spaceless %} {% if levels|length == 1 %} {% with icon="formset/icons/heading"|add:levels.0|add:".svg" %} {% endwith %} {% else %} {% for level in levels %} {% with icon="formset/icons/heading"|add:level|add:".svg" %} {% include icon %} {% endwith %} {% endfor %} {% endif %} {% endspaceless %}