Skip to content

Kirby 3.7.5

$site->videos()

Filters the Files collection by type videos

$site->videos(): Kirby\Cms\Files

Return type

Kirby\Cms\Files

Parent class

Kirby\Cms\Site

Example

<h2>Videos</h2>
<?php foreach($site->videos() as $video): ?>
<video width="300" height="200" controls>
  <source src="<?= $video->url() ?>" type="<?= $video->mime() ?>">
</video>
<?php endforeach ?>