Skip to content

Kirby 5.1.1

$site->findPageOrDraft()

Finds a single published or draft child

$site->findPageOrDraft(string $path): Kirby\Cms\Page|null

Parameters

Name Type Default
$pathrequired string no default value

Return types

Kirby\Cms\Pageornull

This method modifies the existing $site object it is applied to and returns it again.

Parent class

Kirby\Cms\Site

Examples

dump($site->findPageOrDraft('notes/in-the-jungle-of-sumatra'));