Reference

Guide

$files->offset()

Returns a new object starting from the given offset

$files->offset(int $offset): Kirby\Toolkit\Collection

Parameters

Name Type Default Description
$offset int

The index to start from

Return type

Kirby\Toolkit\Collection

Example

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

Inherited from

Kirby\Toolkit\Collection

Source code

kirby/src/Toolkit/Collection.php#L651