Reference

Guide

$pagination->page()

Getter for the current page


$pagination->page(int $page = null): int

Parameters

Name Type Default Description
$page int null

Return type

int

Example

<?php

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

echo 'The current page is ' . $pagination->page();

?>

Inherited from

Kirby\Toolkit\Pagination

Source code

kirby/src/Toolkit/Pagination.php#L132