$pages->slice($offset = null, $limit = null)

Returns a sliced version of the collection defined by offset and limit

  • $offset (int)
    The offset number
  • $limit (int)
    The number of items to be returned
  • return ($pages)

Example

<ul>
  <?php foreach($page->children()->slice(10, 20) as $subpage): ?>
  <li>
    <a href="<?php echo $subpage->url() ?>">
      <?php echo html($subpage->title()) ?>
    </a>
  </li>
  <?php endforeach ?>
</ul>