We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Template renderer issue after using template in Mailer class

Hi, I'm learning Phalcon with the Vokuro Project and I have a problem:

I'm using a diffrent Users class as I'm working with MongoDB instead of Mysql. In Aftersave() function, I'm using the Mail class of Vokuro, but when I call getTemplate, I've a white screen after as if all template where disabled. If I commented getTemplate, I don't have the issue Do you think the controller keep the render set up in the function: Did someone get the same issue working with Vokuro sample? Many thanks for your help Content of getTemplate:

return $this->view->getRender('emailTemplates', $name, $parameters, function ($view) { $view->setRenderLevel(View::LEVEL_LAYOUT); });



4.2k

Here is the way I fixed the issue which is not a very clean way:

I use 2 kinds of view in my DI: volt for actioncontroler and phtml for email content, so that, the phtml call doesn't not reset the volt view