From 3fc0fc38ceef41b2a1c56d59c34bfe122ff8edb3 Mon Sep 17 00:00:00 2001 From: Awilum Date: Fri, 23 Aug 2019 14:43:10 +0300 Subject: [PATCH] feat(admin-plugin): add ability to get query inside twig templates #186 --- site/plugins/site/app/Controllers/SiteController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/plugins/site/app/Controllers/SiteController.php b/site/plugins/site/app/Controllers/SiteController.php index f3955b19..c212087a 100644 --- a/site/plugins/site/app/Controllers/SiteController.php +++ b/site/plugins/site/app/Controllers/SiteController.php @@ -85,9 +85,9 @@ class SiteController extends Controller $path = 'themes/' . $this->registry->get('settings.theme') . '/' . (empty($this->entry['template']) ? 'templates/default' : 'templates/' . $this->entry['template']) . '.html'; if ($is_entry_not_found) { - return $this->view->render($response->withStatus(404), $path, ['entry' => $this->entry]); + return $this->view->render($response->withStatus(404), $path, ['entry' => $this->entry, 'query' => $query]); } - return $this->view->render($response, $path, ['entry' => $this->entry, 'page' => $query['page'] ?? '']); + return $this->view->render($response, $path, ['entry' => $this->entry, 'query' => $query]); } }