Fix first page calculation
This commit is contained in:
parent
3e374c7585
commit
d01374dddb
@ -72,7 +72,12 @@ abstract class Entry
|
||||
|
||||
if ($this instanceof Directory) {
|
||||
foreach ($this->value as $node) {
|
||||
if ($node instanceof Content && $node->title != 'index') {
|
||||
if ($node instanceof Content) {
|
||||
if (!count($node->getParents()) && $node->title == 'index') {
|
||||
//the homepage should not count as first page
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->first_page = $node;
|
||||
return $node;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user