Skip to content

Kirby 3.8.4

$pages->findBy()

Find a single element by an attribute and its value

$pages->findBy(string $attribute, mixed $value): mixed|null

Parameters

Name Type Default
$attribute * string
$value * mixed

Return type

mixed|null

Parent class

Kirby\Cms\Pages inherited from Kirby\Cms\Collection

Example

<?= $page->children()->findBy('uid', 'some-page')->title() ?>