$pages->has($page)

Checks if a $page object is included in the collection

  • $page (Page | string)
    Accepts a UID or a page object
  • return (boolean)
<?php if($page->children()->has('some-page')): ?>
There exists a subpage with the uid `some-page`
<?php endif ?>