Skip to content

Kirby 4.1.2

$site->hasChildren()

Checks if the model has any published children

$site->hasChildren(): bool

Return type

bool

Parent class

Kirby\Cms\Site

Example

<?php if($site->hasChildren()): ?>
There are children in /content.
<?php endif ?>