diff --git a/system/src/Grav/Common/Page/Pages.php b/system/src/Grav/Common/Page/Pages.php index 39a201d7a..39aa9d487 100644 --- a/system/src/Grav/Common/Page/Pages.php +++ b/system/src/Grav/Common/Page/Pages.php @@ -300,7 +300,7 @@ class Pages $list[$current->route()] = str_repeat('  ', ($level-1)*2) . $current->title(); } - foreach ($current as $next) { + foreach ($current->children() as $next) { $list = array_merge($list, $this->getList($next, $level + 1)); }