twig_gear

Categories

Component ID

2501921

Component name

twig_gear

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

Helper functions to work with Twig in Drupal 8

  1. swapClass : change CSS class to another if exist in argument
    for example {{ item.attributes|swapClass('menu-item--active-trail', 'active') }} change menu-item--active-trail to active
  2. tg_site_name : global variable which have site name in any template {{ tg_site_name }}

Fill free to add issues!
More came for my needs but if u have any idea how do this module better open issue.