{%- if heads %} {%- for group, value in heads.items() %} {%- for head in value %} {{ head | safe }} {%- endfor %} {%- endfor %} {%- endif %}