Skip to content

Adds event "twigLoaderPreInit.customize" #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 11, 2016

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.

1 participant