Add template_name to twig variables

This commit is contained in:
slawkens 2025-02-08 23:43:15 +01:00
parent 4455964db4
commit ae1161d770

View File

@ -133,6 +133,7 @@ if($forumSetting != '')
$template['link_forum'] = "<a href='" . $forumSetting . "' target='_blank'>"; $template['link_forum'] = "<a href='" . $forumSetting . "' target='_blank'>";
} }
$twig->addGlobal('template_name', $template_name);
$twig->addGlobal('template_path', $template_path); $twig->addGlobal('template_path', $template_path);
if($twig_loader) { if($twig_loader) {
$twig_loader->prependPath(BASE . $template_path); $twig_loader->prependPath(BASE . $template_path);