Adding this would let PL use Twig Namespaces (i.e. {% include "@atoms/forms/submit.twig" %} ) for templates as an alternative to the Pattern Partial Syntax ({% include "atoms-submit" %}). The reason behind this is that we are able to register namespaces in other systems (like Drupal using the components module) and then have both systems digest the same templates.
This change would register a namespace for each top level folder under source/_patterns/. Assuming the classic top levels folders of atoms, molecules, etc were used; this would create the following namespaces, essentially little "shortcuts" to each directory:
@atoms => source/_patterns/00-atoms/
@molecules => source/_patterns/01-molecules/
@organisms => source/_patterns/02-organisms/
@templates => source/_patterns/03-templates/
@pages => source/_patterns/04-pages/
Assuming I had this folder structure:
00-atoms/
forms/
text.twig
submit.twig
I could then include it with {% include "@atoms/forms/submit.twig" %}. THAT WOULD BE AWESOME!
Could we get this in? Anything I need to change? THANKS!!!
Adding this would let PL use Twig Namespaces (i.e.
{% include "@atoms/forms/submit.twig" %}
) for templates as an alternative to the Pattern Partial Syntax ({% include "atoms-submit" %}
). The reason behind this is that we are able to register namespaces in other systems (like Drupal using the components module) and then have both systems digest the same templates.This change would register a namespace for each top level folder under
source/_patterns/
. Assuming the classic top levels folders of atoms, molecules, etc were used; this would create the following namespaces, essentially little "shortcuts" to each directory:@atoms
=>source/_patterns/00-atoms/
@molecules
=>source/_patterns/01-molecules/
@organisms
=>source/_patterns/02-organisms/
@templates
=>source/_patterns/03-templates/
@pages
=>source/_patterns/04-pages/
Assuming I had this folder structure:
I could then include it with
{% include "@atoms/forms/submit.twig" %}
. THAT WOULD BE AWESOME!Could we get this in? Anything I need to change? THANKS!!!