$site->hasListedChildren()
Checks if the page has any listed children
$site->hasListedChildren(): bool
Return type
bool
This method modifies the existing $site
object it is applied to and returns it again.
Parent class
Examples
<?php if ($site->hasListedChildren()): ?>
<nav>
<?php foreach ($site->children()->listed() as $child): ?>
<a href="<?= $child->url() ?>"><?= $child->title() ?></a>
<?php endforeach ?>
</nav>
<?php endif ?>