Reference

Guide

$files->not()

Returns a Collection without the given element(s)

$files->not(\mixxed[] $keys = null): Kirby\Cms\Collection

Parameters

Name Type Default Description
$keys mixxed[] null

any number of keys, passed as individual arguments

Return type

Kirby\Cms\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#L203