mirror of
https://github.com/getgrav/grav.git
synced 2026-08-31 04:35:54 +02:00
Fix Page::filePath() for modular content
This commit is contained in:
@@ -48,7 +48,7 @@ form:
|
||||
|
||||
folder:
|
||||
type: text
|
||||
label: Folder Name
|
||||
label: Filename
|
||||
validate:
|
||||
type: slug
|
||||
required: true
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user