Skip to content

$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>