Merge branch 'develop' of https://github.com/getgrav/grav into 2.0

This commit is contained in:
Matias Griese
2017-12-01 20:40:36 +02:00

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