$pages->visible()
Returns all visible items in the collection
-
return ($pages)
Example
<h2>Visible subpages</h2>
<ul>
<?php foreach($page->children()->visible() as $subpage): ?>
<li>
<a href="<?= $subpage->url() ?>">
<?= html($subpage->title()) ?>
</a>
</li>
<?php endforeach ?>
</ul>