Skip to content

Kirby 5.1.2

$item->next()

Returns the next item in the collection if available

$item->next(Kirby\Cms\Items|null $collection = null): Kirby\Cms\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