From 5cee23cbfa38df9e07225511fc9a8e37a1753ce1 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 6 Aug 2015 18:30:50 -0600 Subject: [PATCH] Added new unsetRoute() to allow route() to rebuild --- system/src/Grav/Common/Page/Page.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index 83b7a0588..5d53764f4 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -1224,6 +1224,15 @@ class Page return $this->route; } + /** + * Helper method to clear the route out so it regenerates next time you use it + */ + public function unsetRoute() + { + unset($this->route); + + } + public function rawRoute($var = null) { if ($var !== null) {