merkle-open / twig-nitro-library

Extension to embrace the Terrific frontend methodology in Twig.
https://github.com/namics/twig-nitro-library
MIT License
6 stars 5 forks source link

Allow multiple templates per component #4

Open grahl opened 7 years ago

grahl commented 7 years ago

Components should allow to trigger different templates, instead of only one, e.g. searchbox.html.twig (default) searchbox-blue.html.twig (variant)

Possibly related to #2 Related Drupal integration issue: https://github.com/namics/drupal-twig-nitro-bridge/issues/1

orlandothoeny commented 3 years ago

Requires changing the Twig Loader to load templates according to these directory patterns:

This is required because it is possible that for component templates multiple .twig files with the same name exist. E.g. directory structure:

- atoms
  - link
    - link.twig
    - fancy.twig
  - text
    - text.twig
    - fancy.twig