$pages->has($page)

Checks if a $page object is included in the collection

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