Design adjustments, new content and more
This commit is contained in:
26
site/snippets/pagination.php
Executable file
26
site/snippets/pagination.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?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 ?>
|
Reference in New Issue
Block a user