From b7ff2e65054208d4c414aac96f855f5987c83d60 Mon Sep 17 00:00:00 2001 From: flashwave Date: Thu, 25 Oct 2018 02:23:26 +0200 Subject: [PATCH] Fixed news pagination. --- templates/news/category.twig | 6 ++++-- templates/news/index.twig | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/templates/news/category.twig b/templates/news/category.twig index 946b7621..94f3a3d8 100644 --- a/templates/news/category.twig +++ b/templates/news/category.twig @@ -15,6 +15,10 @@ {% for post in posts %} {{ news_preview(post) }} {% endfor %} + +
+ {{ pagination(category.posts_count, posts_take, posts_offset, '/news.php'|url_construct({'c':category.category_id}), true) }} +
@@ -37,8 +41,6 @@
{% endif %} - - {{ pagination(category.posts_count, posts_take, posts_offset, '/news.php?c=' ~ category.category_id) }} {% endblock %} diff --git a/templates/news/index.twig b/templates/news/index.twig index 551dddec..6f8a3ddf 100644 --- a/templates/news/index.twig +++ b/templates/news/index.twig @@ -12,6 +12,10 @@ {% for post in posts %} {{ news_preview(post) }} {% endfor %} + +
+ {{ pagination(posts_count, posts_take, posts_offset, '/news.php', true) }} +
@@ -31,8 +35,6 @@ {% endfor %}
- - {{ pagination(posts_count, posts_take, posts_offset, '/news.php') }} {% endblock %}