Move system twig templates to last

This commit is contained in:
Andy Miller
2017-12-01 11:38:38 -07:00
parent b4cf7899bb
commit 6ae4680fcb

View File

@@ -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');