Is there a Symfony2 setLayout() equivalent for Twig or PHP templates?
I'm storing my Twig templates in the database and rendering them like this
in the controller:
$twigLoader = new \Twig_Loader_String();
$twig = $this->get('twig');
$twig->setLoader($twigLoader);
$template = $twig->loadTemplate($templateStringFromDB);
# I'd like to set a layout template here
return $this->createResponse($template->render($context));
I'd like to set a layout template but I can't find a way to define template
inheritance outside of the templates.
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en