diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index 67a59a064..3024cc394 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -137,7 +137,7 @@ class Page implements PageInterface $this->metadata(); $this->url(); $this->visible(); - $this->modularTwig($this->slug[0] === '_'); + $this->modularTwig(strpos($this->slug(), '_') === 0); $this->setPublishState(); $this->published(); $this->urlExtension();