27 lines
791 B
PHP
27 lines
791 B
PHP
<?php
|
|
/*
|
|
Snippets are a great way to store code snippets for reuse
|
|
or to keep your templates clean.
|
|
|
|
The pagination snippet renders prev/next links in the
|
|
blog, when articles spread across multiple pages
|
|
|
|
More about snippets:
|
|
https://getkirby.com/docs/guide/templates/snippets
|
|
*/
|
|
?>
|
|
<?php if ($pagination->hasPages()): ?>
|
|
<nav class="pagination">
|
|
<?php if ($pagination->hasPrevPage()): ?>
|
|
<a class="pagination-prev" href="<?= $pagination->prevPageUrl() ?>">←</a>
|
|
<?php else: ?>
|
|
<span class="pagination-prev">←</span>
|
|
<?php endif ?>
|
|
<?php if ($pagination->hasNextPage()): ?>
|
|
<a class="pagination-next" href="<?= $pagination->nextPageUrl() ?>">→</a>
|
|
<?php else: ?>
|
|
<span class="pagination-next">→</span>
|
|
<?php endif ?>
|
|
</nav>
|
|
<?php endif ?>
|