Skip to content

Kirby 6.0.0

$item->next()

Returns the next item in the collection if available

$item->next(Items|null $collection = null): Item|null

Parameters

Name Type Default
$collection Kirby\Cms\Itemsornull null

Return types

Kirby\Cms\Itemornull

This method does not modify the existing $item object but returns a new object with the changes applied. Learn more →

Parent class

Kirby\Cms\Item