twig /lesprojets .islaureat

This commit is contained in:
2025-11-28 11:43:45 +01:00
parent 863f248656
commit 2b03838407
3 changed files with 13 additions and 10 deletions

View File

@@ -62,7 +62,10 @@
* @ingroup themeable
*/
#}
<article{{ attributes }}>
{# On calcule une variable Twig pour savoir si le node est lauréat #}
{% set is_laureat = node.field_laureats.value ?? 0 %}
<article{{ attributes.addClass(is_laureat ? 'is-laureat' : '') }}>
{{ title_prefix }}
{% if label and not page %}