diff --git a/code/controllers/SilverStripeNavigator.php b/code/controllers/SilverStripeNavigator.php index d82ec111..c90f2449 100644 --- a/code/controllers/SilverStripeNavigator.php +++ b/code/controllers/SilverStripeNavigator.php @@ -59,7 +59,8 @@ class SilverStripeNavigator extends ViewableData { } ksort($items); - return new ArrayList($items); + // Drop the keys and let the ArrayList handle the numbering, so $First, $Last and others work properly. + return new ArrayList(array_values($items)); } /**