$pages->has()
Checks if the given object or id is in the collection
$pages->has(string|object $id): bool
Parameters
Name | Type | Default | Description |
---|---|---|---|
$id |
string |object |
– |
Return type
bool
<?php if(page('projects')->children()->has('projects/project-a')): ?>
There exists a subpage with the uid `some-page`
<?php endif ?>
Inherited from
Kirby\Cms\Collection