Skip to content

Kirby 6.0.0

$block->indexOf()

Returns the position / index in the collection

$block->indexOf(Blocks|null $collection = null): int|false

Parameters

Name Type Default
$collection Kirby\Cms\Blocksornull null

Return types

intorfalse

Parent class

Kirby\Cms\Block inherited from Kirby\Cms\Item