drupal-pattern-lab / unified-twig-extensions

Share Pattern Lab's custom Twig extensions with Drupal 8
MIT License
9 stars 10 forks source link

Paths in readme don't seem to work #5

Closed sarahjean closed 4 years ago

sarahjean commented 6 years ago

Trying this out with a custom theme (not Emulsify based) and have twig functions in pattern-lab/source/_twig-components. This gives an error that the functions can't be found. I tried moving the _twig_components folder around and it works if it's only one folder deep inside the theme folder, which looks like it's due to the globbing in ExtensionLoader.php: $extensionPaths = glob($themePath . '*/_twig-components/');

I tried editing to $extensionPaths = glob($themePath . '**/*/_twig-components/'); and that works for my case, so will probably just patch for now. Is there still a plan to make this location customizable?

michael-wojcik commented 6 years ago

This issue should be fixed by this PR: https://github.com/drupal-pattern-lab/unified-twig-extensions/pull/6