Skip to content
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

Global twig variables are not injected #2

Open
Einenlum opened this issue Sep 22, 2016 · 1 comment
Open

Global twig variables are not injected #2

Einenlum opened this issue Sep 22, 2016 · 1 comment

Comments

@Einenlum
Copy link

My global twig variables are not injected in my mail templates (variable not found).

I think here it's missing the global context : https://github.com/PedroTroller/UniMail/blob/master/src/Knp/UniMail/Mailer/TwigMailer.php

@Einenlum Einenlum changed the title Global twig are not injected Global twig variables are not injected Sep 22, 2016
@docteurklein
Copy link

you need to do:

$html = $template->renderBlock('html_body', $this->twig->mergeGlobals($mail->getParameters()));

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

No branches or pull requests

2 participants