Reference

Guide

$pagination->limit()

Getter and setter for the number of items per page

$pagination->limit(int $limit = null): int|Pagination

Parameters

Name Type Default Description
$limit int null

Return type

int|Pagination

Example

$subpages   = $page->children()->paginate(10);
$pagination = $subpages->pagination();

echo 'Displaying ' . $pagination->limit() . ' of ' . $pagination->items() . ' items';

Source code

kirby/src/Toolkit/Pagination.php#L160