Skip to content

Conversation

@EvanLovely
Copy link
Member

This allows plugins to manipulate the loaders list before the Twig Environment is initialized. There already is an event after initialization that allows one to change many things with the Twig Environment, however the problem I came across was when one tried to add more loaders. Turns out that no loader can go after Twig_Loader_String as that loader will interpret anything as a template and try to render it, so no loader can come after it. That is used by core for the rendering of the header and footer. It also is responsible for the mis-typed twig paths to simply output something like this:

@molecules/path/to/file.twig

I'd like to get that fixed as that's a silent error, but that's another issue for another day.

…Twig Loaders before Init of Twig Environment.
@EvanLovely EvanLovely merged commit b8f0c98 into master Oct 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants