2017 © Pedro Peláez
 

library add-attributes-twig-extension

Twig function that allows addition of attributes that can be rendered in both Drupal and Pattern Lab

image

drupal-pattern-lab/add-attributes-twig-extension

Twig function that allows addition of attributes that can be rendered in both Drupal and Pattern Lab

  • Thursday, August 17, 2017
  • by ModulesUnraveled
  • Repository
  • 1 Watchers
  • 6 Stars
  • 18,101 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 2 Versions
  • 50 % Grown

The README.md

add-attributes-twig-extension

Twig function that allows addition of attributes that can be rendered in both Drupal and Pattern Lab. Merges with template level attributes in Drupal and prevents them from trickling down into includes., (*1)

Usage

{% set additional_attributes = {
  "class": ["foo", "bar"],
  "baz": ["foobar", "goobar"],
  "foobaz": "goobaz",
} %}



Can also be used with the bem function:, (*2)

{% set additional_attributes = {
  "class": bem("foo", ["bar", "baz"], "foobar"),
} %}



The Versions

17/08 2017

dev-master

9999999-dev

Twig function that allows addition of attributes that can be rendered in both Drupal and Pattern Lab

  Sources   Download

MIT

by Evan Willhite
by Jeff Tomlinson

17/08 2017

v1.0.1

1.0.1.0

Twig function that allows addition of attributes that can be rendered in both Drupal and Pattern Lab

  Sources   Download

MIT

by Evan Willhite
by Jeff Tomlinson