Restore numbering to navigator items so we can use iterator.
Otherwise the numbering is by priority which is not traversable (1000, 2000, 3000...).
This commit is contained in:
parent
35cbe28188
commit
a9004b9978
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue