Reference

Guide

$pages->offset()

Returns a new object starting from the given offset

$pages->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->children()->offset(10) as $subpage): ?>
  <li>
    <a href="<?= $subpage->url() ?>">
      <?= html($subpage->title()) ?>
    </a>
  </li>
  <?php endforeach ?>
</ul>

Inherited from

Kirby\Toolkit\Collection

Source code

kirby/src/Toolkit/Collection.php#L681