Skip to content

Kirby 4.1.2

$site->hasCode()

Checks if the Files collection has any code files

$site->hasCode(): bool

Return type

bool

Parent class

Kirby\Cms\Site

Example

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