$page->isChildOf()
Checks if the page is a child of the given page
$page->isChildOf(Kirby\Cms\Page|string $parent): bool
Parameters
Name | Type | Default |
---|---|---|
$parentrequired | Kirby\Cms\Page orstring |
no default value |
Return type
bool
Parent class
Examples
<?php if ($page->isChildOf('some-parent-page')): ?>
This page is a child of it's parent!
<?php endif ?>