From 3e29ae09234ad8e4e69c2e64ed0689c828a39738 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Wed, 24 Aug 2016 15:49:46 -0600 Subject: [PATCH] More reliable `Page::home()` check --- system/src/Grav/Common/Page/Page.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index b77859714..db4e13dd1 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -2153,7 +2153,9 @@ class Page */ public function home() { - return $this->find('/') == $this; + $home = Grav::instance()['config']->get('system.home.alias'); + $is_home = ($this->route() == $home || $this->rawRoute() == $home); + return $is_home; } /**