Skip to content

Kirby 4.5.0

$page->hasListedChildren()

Checks if the page has any listed children

$page->hasListedChildren(): bool

Return type

bool

Parent class

Kirby\Cms\Page

Example

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

if($page->hasListedChildren()) {
  $children = $page->children()->listed();
}