1
0
mirror of https://github.com/typemill/typemill.git synced 2025-07-30 19:00:32 +02:00

Version 1.2.5: Create Pages

This commit is contained in:
Sebastian
2018-10-07 10:55:48 +02:00
parent 77985ccacb
commit 9b16a17d0b
13 changed files with 57 additions and 46 deletions

View File

@@ -149,20 +149,17 @@ abstract class ContentController
# scan the content of the folder
$structure = Folder::scanFolder($this->settings['rootPath'] . $this->settings['contentFolder'], $draft);
# if there is no content, render an empty page
if(count($structure) == 0)
# if there is content, then get the content details
if(count($structure) > 0)
{
$this->errors = ['errors' => ['message' => 'content folder is empty']];
return false;
# create an array of object with the whole content of the folder
$structure = Folder::getFolderContentDetails($structure, $this->uri->getBaseUrl(), $this->uri->getBasePath());
}
# create an array of object with the whole content of the folder
$structure = Folder::getFolderContentDetails($structure, $this->uri->getBaseUrl(), $this->uri->getBasePath());
# cache navigation
$this->write->updateCache('cache', $filename, 'lastCache.txt', $structure);
}
$this->structure = $structure;
return true;
}