'my_class', 'other-class', 'classsssss' ] %} ... But if you do this, Drupal shouts at you so much. {% set card_classes = [
twig-addclass
Your variables classes and my_classes are arrays. You could merge them: {{ attributes.addClass(classes, my_classes) }}. Or add them one by .... Nov 29, 2017 — So, if I know Drupal has a line like this in its node.html.twig: . I want to be able to put the same thing .... node.html.twig. {% set classes = [ 'node', 'node--type-' ~ node.bundle|clean_class, ] %} 939c2ea5af
twig addclass, twig addclass drupal 8, twig addclass multiple, drupal twig addclass
Comments