Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By crashbdx on
Hi everyone,
i have a taxonomy in my content type which is like "A" "B" "C" or "D"
when i want compare it in my twig template to check if it is equal to A B C or D it always return false, so i tried print is as :
<span class="note note{{ fields.field_classe_energetique.content }}">
so i can change background color depending on the note, but same its not working because it is not only printing A B C or D but also all the theme hook, suggestions etc from Devel, is there a way to not print that only for this variable ?
Thanks in advance.
Comments
If i set :
If i set :
to false everything work but its a bit complicated to work by switching debut always to see the result, is there anyway to print a specific twig variable without the debug infos and without turning the entire twig debug off ?