mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-06 20:16:52 +02:00
fixes #2481 - twig3 breaking editor preview
Signed-off-by: Andy Miller <rhuk@mac.com>
This commit is contained in:
@@ -2369,7 +2369,10 @@ class AdminController extends AdminBaseController
|
||||
|
||||
// Add theme template paths to Twig loader
|
||||
$template_paths = $this->grav['locator']->findResources('theme://templates');
|
||||
$this->grav['twig']->twig->getLoader()->addLoader(new FilesystemLoader($template_paths));
|
||||
$loader = $this->grav['twig']->loader();
|
||||
foreach ($template_paths as $path) {
|
||||
$loader->addPath($path);
|
||||
}
|
||||
|
||||
$html = $page->content();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user