diff --git a/system/src/Grav/Common/Page/Pages.php b/system/src/Grav/Common/Page/Pages.php index b676ca639..19c654b6a 100644 --- a/system/src/Grav/Common/Page/Pages.php +++ b/system/src/Grav/Common/Page/Pages.php @@ -359,9 +359,11 @@ class Pages public function all(Page $current = null) { $all = new Collection(); + + /** @var Page $current */ $current = $current ?: $this->root(); - if ($current->routable()) { + if (!$current->root()) { $all[$current->path()] = [ 'slug' => $current->slug() ]; }