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