From 5bf3e93242e73f3368dd9ac819e5022250bca618 Mon Sep 17 00:00:00 2001 From: Awilum Date: Wed, 19 Jun 2019 15:59:39 +0300 Subject: [PATCH] Pagination #164 #165 --- site/plugins/site/app/Controllers/SiteController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/site/plugins/site/app/Controllers/SiteController.php b/site/plugins/site/app/Controllers/SiteController.php index ced230e5..ba10480d 100644 --- a/site/plugins/site/app/Controllers/SiteController.php +++ b/site/plugins/site/app/Controllers/SiteController.php @@ -36,6 +36,9 @@ class SiteController extends Controller */ public function index(Request $request, Response $response, array $args) { + // Get Query Params + $query = $request->getQueryParams(); + // Get uri $uri = $args['uri']; @@ -90,7 +93,7 @@ class SiteController extends Controller if ($is_entry_not_found) { return $this->view->render($response->withStatus(404), $path, ['entry' => $this->entry]); } else { - return $this->view->render($response, $path, ['entry' => $this->entry]); + return $this->view->render($response, $path, ['entry' => $this->entry, 'page' => ($query['page']) ?? '']); } }