Skip to content

Support Twig custom paths and namespacing #1604

Closed
@crittermike

Description

Namespaces are a very useful concept in Twig. You can see the Symfony implementation here: https://symfony.com/doc/current/templating/namespaced_paths.html#registering-your-own-namespaces

Any chance of adding support for them in Grav? Something like a twig_paths: property in the theme YAML that defines paths and the namespaces for them, perhaps?

(I'd also appreciate any pointers in setting this up manually via a plugin, because messing with Twig_Loader_Filesystem::addPath() has proven to be difficult.)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions