Skip to content

Kirby 4.4.1

$page->is()

Compares the current object with the given page object

$page->is(\Kirby\Cms\Page|string $page): bool

Parameters

Name Type Default
$page * Kirby\Cms\Page|string

Return type

bool

Parent class

Kirby\Cms\Page

Example

Filter all articles for the current author page:

$postsForAuthor = page('blog')
    ->children()
    ->listed()
    ->filter(fn ($child) => $child->author()->toPage()?->is($page));