{% set hasUnreadNotification = false %} {% set notificationsCounter = 0 %} {% for notification in notifications %} {% if notification.isRead == false %} {% set hasUnreadNotification = true %} {% set notificationsCounter = notificationsCounter + 1 %} {% endif %} {% endfor %}
{{ notificationsCounter }}
{# #}