Fixed news pagination.

This commit is contained in:
flash 2018-10-25 02:23:26 +02:00
parent 71b65b93d6
commit b7ff2e6505
2 changed files with 8 additions and 4 deletions

View file

@ -15,6 +15,10 @@
{% for post in posts %}
{{ news_preview(post) }}
{% endfor %}
<div class="container" style="padding: 5px;">
{{ pagination(category.posts_count, posts_take, posts_offset, '/news.php'|url_construct({'c':category.category_id}), true) }}
</div>
</div>
<div class="news__sidebar">
@ -37,8 +41,6 @@
</div>
</div>
{% endif %}
{{ pagination(category.posts_count, posts_take, posts_offset, '/news.php?c=' ~ category.category_id) }}
</div>
</div>
{% endblock %}

View file

@ -12,6 +12,10 @@
{% for post in posts %}
{{ news_preview(post) }}
{% endfor %}
<div class="container" style="padding: 5px;">
{{ pagination(posts_count, posts_take, posts_offset, '/news.php', true) }}
</div>
</div>
<div class="news__sidebar">
@ -31,8 +35,6 @@
{% endfor %}
</div>
</div>
{{ pagination(posts_count, posts_take, posts_offset, '/news.php') }}
</div>
</div>
{% endblock %}