$page->children()
Returns all published children
$page->children(): Kirby\Cms\Pages
Return type
This method modifies the existing $page
object it is applied to and returns it again.
Parent class
Examples
<h2>Subpages</h2>
<ul>
<?php foreach($page->children() as $subpage): ?>
<li>
<a href="<?= $subpage->url() ?>">
<?= html($subpage->title()) ?>
</a>
</li>
<?php endforeach ?>
</ul>