$site->hasListedChildren()
Checks if the page has any listed children
$site->hasListedChildren(): bool
Return type
bool
Parent class
Example
<?php if($site->hasListedChildren()): ?>
<nav>
<?php foreach ($site->children()->listed() as $child): ?>
<a href="<?= $child->url() ?>"><?= $child->title() ?></a>
<?php endforeach ?>
</nav>
<?php endif ?>