$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();
}
?>
Checks if the page has children
<?php
echo $page->hasChildren(); //returns the number of children in the folder
if($page->hasChildren()) {
$children = $page->children();
}
?>