Skip to content

Kirby 6.0.0

$site->hasCode()

Checks if the Files collection has any code files

$site->hasCode(): bool

Return type

bool

Parent class

Kirby\Cms\Site

Examples

<?php if ($site->hasCode()): ?>
The /content folder contains code files.
<?php endif ?>