From 5d48aa704062008dcdb94aceea8319bbd52bf4b6 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Tue, 6 Dec 2016 20:04:07 +0100 Subject: [PATCH] Let Pico::getTwigVariables() return the "real" array Currently Pico::getTwigVariables() always returns the default twig variables and ignores all additions/changes made through the onPageRendering event. The method now returns the "real" variables array used by Twig. --- lib/Pico.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Pico.php b/lib/Pico.php index e6af4e7..91b174e 100644 --- a/lib/Pico.php +++ b/lib/Pico.php @@ -1474,6 +1474,10 @@ class Pico */ protected function getTwigVariables() { + if ($this->twigVariables !== null) { + return $this->twigVariables; + } + $frontPage = $this->getConfig('content_dir') . 'index' . $this->getConfig('content_ext'); return array( 'config' => $this->getConfig(),