init
This commit is contained in:
15
user/themes/mediator/templates/partials/pagination.html.twig
Normal file
15
user/themes/mediator/templates/partials/pagination.html.twig
Normal file
@@ -0,0 +1,15 @@
|
||||
{% if base_url == '' %}
|
||||
{% set base_url = '/' %}
|
||||
{% endif %}
|
||||
|
||||
<nav class="pagination" role="navigation">
|
||||
{% if pagination.hasNext %}
|
||||
{% set url = (base_url ~ pagination.params ~ pagination.nextUrl)|replace({'//':'/'}) %}
|
||||
<a class="older-posts" href="{{ url }}">← Older posts</a>
|
||||
{% endif %}
|
||||
<span class="page-number">Page {{ uri.currentPage }} of {{ pagination|length }}</span>
|
||||
{% if pagination.hasPrev %}
|
||||
{% set url = (base_url ~ pagination.params ~ pagination.prevUrl)|replace({'//':'/'}) %}
|
||||
<a class="newer-posts" href="{{ url }}">Newer posts →</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
Reference in New Issue
Block a user