$page->hasVisibleChildren()

Checks if the page has any visible children

  • return (integer)

Example

<?php
echo $page->hasVisibleChildren(); //returns the number of visible children in the folder

if($page->hasVisibleChildren()) {
  $children = $page->children()->visible();
}
?>