$page->documents()
Filters the Files collection by type documents
$page->documents(): Kirby\Cms\FilesReturn type
Parent class
Example
<h2>Available PDFs</h2>
<ul>
  <?php foreach($page->documents()->filterBy('extension', 'pdf') as $pdf): ?>
  <li>
    <a href="<?= $pdf->url() ?>">
      <?= $pdf->filename() ?>
      (<?= $pdf->niceSize() ?>)
    </a>
  </li>
  <?php endforeach ?>
</ul>What is a document file?
Kirby considers the following file types as document:
- text
- mdown
- md
- markdown
- doc
- docx
- dotx
- word
- xl
- xls
- xlsx
- xltx
- ppt
- pptx
- csv
- rtf
- rtx