From 1904ddbea0004a0be69705a51553a9023f15587a Mon Sep 17 00:00:00 2001 From: Awilum Date: Wed, 15 Jan 2020 18:25:58 +0300 Subject: [PATCH] feat(site-plugin): add ability to access uri variable in the theme templates --- 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 f538c563..046fea69 100644 --- a/site/plugins/site/app/Controllers/SiteController.php +++ b/site/plugins/site/app/Controllers/SiteController.php @@ -90,10 +90,10 @@ 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, 'query' => $query]); + return $this->view->render($response->withStatus(404), $path, ['entry' => $this->entry, 'query' => $query, 'uri' => $uri]); } - return $this->view->render($response, $path, ['entry' => $this->entry, 'query' => $query]); + return $this->view->render($response, $path, ['entry' => $this->entry, 'query' => $query, 'uri' => $uri]); } /**