twig if is first element of array 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 %}