$page->hasAudio()

Checks if there are any audio files in the page's directory

  • return (integer)

Example

<?php
echo $page->hasAudio(); //returns the number of audio files in the folder

if($page->hasAudio()) {
  $audio = $page->audio();
}
?>