Hi Guys,
Last two days I am focussing how to use an database for storing .twig files (actually content). On the website there is an recipe but I don’t really get it.
Here is the link: http://twig.sensiolabs.org/doc/2.x/recipes.html#using-a-database-to-store-templates
This is the ‘current’ syntax:
return $this->view->render($response, 'pages/page.twig', [
'pageData' => $pageData
]);
and I would like to replace ‘pages/page.twig’ for the array/data from the database. It does not work if I do it like this:
return $this->view->render($response, $template, [
'pageData' => $pageData
]);
How can I solve this?
Thanks in advance.