Skip to content

Kirby 5.1.1

$page->hasUnlistedChildren()

Checks if the page has any unlisted children

$page->hasUnlistedChildren(): bool

Return type

bool

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

Parent class

Kirby\Cms\Page

Examples

echo $page->hasUnlistedChildren(); // will echo 1 if true, nothing if false

if ($page->hasUnlistedChildren()) {
  $unlistedChildren = $page->children()->unlisted();
}