Skip to content

Kirby 3.8.4

$site->files()

Returns the Files collection

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

Return type

Kirby\Cms\Files

Parent class

Kirby\Cms\Site

Example

<h2>Files</h2>
<ul>
  <?php foreach($site->files() as $file): ?>
  <li>
    <a href="<?= $file->url() ?>">
      <?= $file->filename() ?>
      (<?= $file->niceSize() ?>)
    </a>
  </li>
  <?php endforeach ?>
</ul>