mirror of
https://github.com/getgrav/grav.git
synced 2026-03-16 01:21:07 +01:00
Modular template extension follows the master page extension (#2044)
This commit is contained in:
committed by
Andy Miller
parent
ab58cca3f7
commit
036fc2d2af
@@ -238,7 +238,9 @@ class Twig
|
||||
// Process Modular Twig
|
||||
if ($item->modularTwig()) {
|
||||
$twig_vars['content'] = $content;
|
||||
$template = $item->template() . TEMPLATE_EXT;
|
||||
$extension = $this->grav['uri']->extension();
|
||||
$extension = $extension ? ".{$extension}.twig" : TEMPLATE_EXT;
|
||||
$template = $item->template() . $extension;
|
||||
$output = $content = $local_twig->render($template, $twig_vars);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user