pattern-lab / patternengine-php-twig

Twig-based PatternEngine for Pattern Lab.
http://patternlab.io/
MIT License
78 stars 36 forks source link

Incompatibility with UI Patterns (Drupal module) #38

Open tanc opened 7 years ago

tanc commented 7 years ago

The UI Patterns module allows patterns to be created and these can be associated with Pattern Lab based twig files. Due to Drupal's hard coded .html.twig extension in ThemeManager the UI Patterns module can't load a twig file from Pattern Lab which is missing the .html portion. This means that to load a twig file from Pattern Lab it has to be renamed to html.twig and all the supporting files also need to have html in them, for example: something.html.json. This is unpleasant. Is there a way of specifying the twig files in Pattern Lab to use html.twig while retaining the name of the supporting JSON, scss and md files without 'html' in the title?

See: nuvoleweb/ui_patterns/issues/49

tanc commented 7 years ago

It would appear that symfony/twig advocates the .html.twig file extension, so it would be great if this was supported in Pattern Lab.

https://symfony.com/doc/current/reference/configuration/twig.html

tanc commented 7 years ago

Any thoughts on this?

ademarco commented 7 years ago

@tanc UI Patterns will support any extensions via the use: property once this PR will get in: https://github.com/nuvoleweb/ui_patterns/pull/84