mirror of
https://github.com/getgrav/grav.git
synced 2026-03-05 03:51:50 +01:00
Move system twig templates to last
This commit is contained in:
@@ -85,9 +85,6 @@ class Twig
|
||||
|
||||
$active_language = $language->getActive();
|
||||
|
||||
// Add Grav core templates location
|
||||
$this->twig_paths[] = $locator->findResource('system://templates');
|
||||
|
||||
// handle language templates if available
|
||||
if ($language->enabled()) {
|
||||
$lang_templates = $locator->findResource('theme://templates/' . ($active_language ? $active_language : $language->getDefault()));
|
||||
@@ -100,6 +97,9 @@ class Twig
|
||||
|
||||
$this->grav->fireEvent('onTwigTemplatePaths');
|
||||
|
||||
// Add Grav core templates location
|
||||
$this->twig_paths = array_merge($this->twig_paths, $locator->findResources('system://templates'));
|
||||
|
||||
$this->loader = new \Twig_Loader_Filesystem($this->twig_paths);
|
||||
|
||||
$this->grav->fireEvent('onTwigLoader');
|
||||
|
||||
Reference in New Issue
Block a user