From 978dc571bbd8a1b13c2530c03c7ce38857431eb7 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 11 Sep 2014 15:32:44 -0600 Subject: [PATCH] Fix for menu not highlighting properly --- system/src/Grav/Common/Page/Page.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index b1c97f80c..9c75dfa8d 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -204,7 +204,7 @@ class Page } if (isset($this->header->markdown_extra)) { $this->markdown_extra = (bool)$this->header->markdown_extra; - } + } if (isset($this->header->taxonomy)) { foreach ($this->header->taxonomy as $taxonomy => $taxitems) { $this->taxonomy[$taxonomy] = (array)$taxitems; @@ -218,7 +218,7 @@ class Page $this->process[$process] = $status; } } - + } return $this->header; @@ -1233,7 +1233,8 @@ class Page public function activeChild() { $uri = self::$grav['uri']; - if (!$this->home() && (strpos($uri->url(), $this->url()) !== false)) { + + if (!$this->home() && (strpos($uri->url(), $this->url()) === 0)) { return true; } return false;