Reference

Guide

$files->not()

Returns a Collection without the given element(s)

$files->not($keys = null): Collection

Parameters

Name Type Default Description
$keys getkirby.com/docs/reference/objects/asset/alt null

Return type

Collection

Example

<ul>
  <?php foreach($page->files()->not($page->files()->first()) as $file): ?>
  <li>
    <a href="<?= $file->url() ?>">
      <?= html($file->filename()) ?>
    </a>
  </li>
  <?php endforeach ?>
</ul>

Inherited from

Kirby\Cms\Collection

Source code

kirby/src/Cms/Collection.php#L201