diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index e75638bba..6a49b0a56 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -1349,10 +1349,21 @@ class Page { /** @var Uri $uri */ $uri = self::$grav['uri']; + $config = self::$grav['config']; - if (!$this->home() && (strpos($uri->url(), $this->url()) === 0)) { - return true; + // Special check when item is home + if ($this->home()) { + $paths = $uri->paths(); + $home = ltrim($config->get('system.home.alias'), '/'); + if ($paths[0] == $home) { + return true; + } + } else { + if (strpos($uri->url(), $this->url()) === 0) { + return true; + } } + return false; }