Refactor the tree system
Each element of the tree now only has one parent, not a parent array. - Creating an elements doesn't necessarily rely on an existing file - Moving elements unregisters elements from the previous parent - Moved some helpers to the builder instead of Entry
This commit is contained in:
@ -11,8 +11,7 @@ class MarkdownPage extends \Todaymade\Daux\Format\Base\MarkdownPage
|
||||
if ($this->title === 'index') {
|
||||
$minimum_parent_dir_size = ($this->params['multilanguage']) ? 2 : 1;
|
||||
if (count($this->file->getParents()) >= $minimum_parent_dir_size) {
|
||||
$parents = $this->file->getParents();
|
||||
$this->title = end($parents)->getTitle();
|
||||
$this->title = $this->file->getParent()->getTitle();
|
||||
} else {
|
||||
$this->homepage = ($this->file->getName() === '_index');
|
||||
$this->title = $this->params['title'];
|
||||
|
Verwijs in nieuw issue
Block a user