Skip to content

Kirby 5.1.1

$site->hasAudio()

Checks if the Files collection has any audio files

$site->hasAudio(): bool

Return type

bool

This method modifies the existing $site object it is applied to and returns it again.

Parent class

Kirby\Cms\Site

Examples

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