Fix Page::filePath() for modular content

This commit is contained in:
Matias Griese
2014-10-08 15:12:22 +03:00
parent 8d8129b49e
commit fdf2884f97
2 changed files with 4 additions and 1 deletions

View File

@@ -48,7 +48,7 @@ form:
folder:
type: text
label: Folder Name
label: Filename
validate:
type: slug
required: true

View File

@@ -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;
}