Reference

$page->hasUnlistedChildren()

Checks if the page has any unlisted children

$page->hasUnlistedChildren(): bool

Return type

bool

Example

// returns the number of unlited children in the folder
echo $page->hasUnlistedChildren();

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

Source code

kirby/src/Cms/HasChildren.php#L192