diff --git a/system/blueprints/pages/modular_raw.yaml b/system/blueprints/pages/modular_raw.yaml index 7a547d376..fc400d40d 100644 --- a/system/blueprints/pages/modular_raw.yaml +++ b/system/blueprints/pages/modular_raw.yaml @@ -48,7 +48,7 @@ form: folder: type: text - label: Folder Name + label: Filename validate: type: slug required: true diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index adcc99acd..7a67ac148 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -926,6 +926,9 @@ class Page // Path to the page. $this->path = dirname(dirname($var)); } + if ($this->modular()) { + return $this->name ? $this->path . '/' . $this->folder . '.md' : null; + } return $this->name ? $this->path . '/' . $this->folder . '/' . $this->name : null; }