$page->hasVideos()

Checks if there are any video files in the page directory

  • return (integer)

Example

<?php
echo $page->hasVideos(); //returns the number of videos in the folder

if($page->hasImages()) {
  $videos = $page->videos();
}
?>