diff --git a/libs/Format/HTML/ContentPage.php b/libs/Format/HTML/ContentPage.php index 7f047ed3..1cfadb82 100644 --- a/libs/Format/HTML/ContentPage.php +++ b/libs/Format/HTML/ContentPage.php @@ -82,7 +82,7 @@ protected function generatePage() 'filename' => $this->file->getName(), 'language' => $this->language, 'path' => $this->file->getPath(), - 'relative_path' => $this->file->getRelativePath(), + 'relative_path' => $this->file->getPath() ? $this->file->getRelativePath() : null, 'modified_time' => $this->file->getPath() ? filemtime($this->file->getPath()) : null, 'markdown' => $this->content, 'request' => $config->getRequest(), diff --git a/templates/content.php b/templates/content.php index 8f1d54ad..d94f4140 100644 --- a/templates/content.php +++ b/templates/content.php @@ -10,7 +10,7 @@ getHTML()->getEditOn(); - if ($edit_on) { ?> + if ($edit_on && $page['relative_path']) { ?> translate("Edit_on")) ?>