$page->hasChildren()

Checks if the page has children

  • return (integer)

Example

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

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

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