$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();
}
?>

Is something missing or incorrect? Edit this page on Github…