twig if first array element in loop code example
Example: twig if first array element
{% for user in users %}
{% if user == users|first %}
First user
{% else %}
Others...
{% endif %}>
{% endfor %}
{% for user in users %}
{% if user == users|first %}
First user
{% else %}
Others...
{% endif %}>
{% endfor %}