mirror of
https://github.com/getgrav/grav.git
synced 2026-02-10 00:27:46 +01:00
More reliable Page::home() check
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user