Reference

$pagination->pageUrl()

Returns the Url of the current page.

$pagination->pageUrl(int $page = null): string|null

Parameters

Name Type Default Description
$page int null

Return type

string|null

<?php

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

?>

…

<a href="<?= $pagination->pageUrl(5) ?>">
  Go to page 5
</a>

Source code

kirby/src/Cms/Pagination.php#L142