mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Allow Pages to be loaded as Twig template
You can now use Twig variables in Pages Like: {{ config.lua.serverName }}
This commit is contained in:
parent
d511679dbd
commit
56738389f8
15
index.php
15
index.php
@ -375,8 +375,19 @@ if($load_it)
|
||||
var_dump($php_errors);
|
||||
}
|
||||
}
|
||||
else
|
||||
$content .= $query['body']; // plain html
|
||||
else {
|
||||
$oldLoader = $twig->getLoader();
|
||||
|
||||
$twig_loader_array = new Twig_Loader_Array(array(
|
||||
'content.html' => $query['body']
|
||||
));
|
||||
|
||||
$twig->setLoader($twig_loader_array);
|
||||
|
||||
$content .= $twig->render('content.html');
|
||||
|
||||
$twig->setLoader($oldLoader);
|
||||
}
|
||||
|
||||
if(hasFlag(FLAG_CONTENT_PAGES) || superAdmin()) {
|
||||
$content = $twig->render('admin.pages.links.html.twig', array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user