$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
Example
Filter all articles for the current author page:
$postsForAuthor = page('blog')
->children()
->listed()
->filter(fn ($child) => $child->author()->toPage()?->is($page));