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

Incompatibility with UI Patterns (Drupal module)

Open tanc opened this issue 8 years ago • 3 comments

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 avatar Jan 31 '17 14:01 tanc

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 avatar Jan 31 '17 14:01 tanc

Any thoughts on this?

tanc avatar Mar 01 '17 08:03 tanc

@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

ademarco avatar Mar 27 '17 11:03 ademarco