patternengine-php-twig icon indicating copy to clipboard operation
patternengine-php-twig copied to clipboard

Support Adding Twig Globals

Open sghoweri opened this issue 8 years ago • 0 comments

https://twig.symfony.com/doc/2.x/advanced.html#id1

I've actually already got a working POC patch for this that we've been using to share certain Design Token values across our Design System in a way that is Drupal / Grav friendly (vs only being available to PL):

https://github.com/bolt-design-system/bolt/blob/develop/.patches/addTwigGlobals.patch

https://github.com/bolt-design-system/bolt/blob/develop/packages/bolt-twig-extensions/globals/bolt-image-sizes.global.php

My question for @aleksip and @EvanLovely is about the way this extension gets called since I tried to do things in a more Symphony like way (in how this gets called). Thoughts?

sghoweri avatar Nov 04 '17 17:11 sghoweri