{% if headerList is not empty %} {# To avoid break lines #} {% for title in headerList %} {{ title }} {% endfor %} {% endif %}