Reference

$pagination->hasPages()

Checks if there are any pages at all

$pagination->hasPages(): bool

Return type

bool

Example

<?php

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

?>

<!-- foreach loop with subpages -->

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

<!-- put pagination here -->

<?php endif ?>

Source code

kirby/src/Toolkit/Pagination.php#L273