On January 9, 2020 . By CodimTh Category: Web Drupal Code snippet that can be used to add class to element in twig with merge filter in Drupal 8. {% set item = item|merge({'#attributes': {'class': 'active'}}) %} Tags : Drupal 8 Snippets Previous PostShow/hide form element based on AJAX-enabled radiobox click in drupal 8Next Postupdate admin password using drush in drupal 8 Comments Add new comment Your name Subject Comment About text formats Restricted HTML Leave this field blank
Comments