Skip to content

Kirby 3.8.4

$pagination->pageUrl()

Returns the URL of the current page.

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

Parameters

Name Type Default
$page int null

Return type

string|null

Parent class

Kirby\Cms\Pagination

<?php

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

?>

…

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