Skip to content

Kirby 5.0.2

$pagination->hasPages()

Checks if there are any pages at all

$pagination->hasPages(): bool

Return type

bool

Parent class

Kirby\Cms\Pagination inherited from Kirby\Toolkit\Pagination

Examples

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

<!-- foreach loop with subpages -->

<?php if ($pagination->hasPages()): ?>

<!-- put pagination here -->

<?php endif ?>