From fdf2884f9744c1704e766dcccab6a19dad5b3c24 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Wed, 8 Oct 2014 15:12:22 +0300 Subject: [PATCH] Fix Page::filePath() for modular content --- system/blueprints/pages/modular_raw.yaml | 2 +- system/src/Grav/Common/Page/Page.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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; }