$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 |
---|---|---|
$parent * | Kirby\Cms\Page |string |
– |
Return type
bool
Parent class
Example
<?php if($page->isChildOf('some-parent-page')): ?>
This page is a child of it's parent!
<?php endif ?>