aboutsummaryrefslogtreecommitdiffstats
path: root/core/include/post
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2021-07-02 20:17:42 +0200
committerThomas Lange <code@nerdmind.de>2021-07-02 20:17:42 +0200
commitf5f94531c9d5b369fdf9c287f63c41476496e5ee (patch)
tree54aa2e26a044dca2d1f3604a920f1527c34e9021 /core/include/post
parent3939dc93d0c11438e8a3e44c48aab2f37128eebc (diff)
downloadblog-f5f94531c9d5b369fdf9c287f63c41476496e5ee.tar.gz
blog-f5f94531c9d5b369fdf9c287f63c41476496e5ee.tar.xz
blog-f5f94531c9d5b369fdf9c287f63c41476496e5ee.zip
Add generic function to create pagination template
This commit adds and uses the new function createPaginationTemplate to create the generic pagination template for various entity lists. This function replaces the many old confusing functions: * generateNaviTemplate * generatePageNaviTemplate * generatePostNaviTemplate * generateUserNaviTemplate * generateCategoryNaviTemplate * generateCategoryPostNaviTemplate
Diffstat (limited to 'core/include/post')
-rw-r--r--core/include/post/list.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/include/post/list.php b/core/include/post/list.php
index 4599883..ab48552 100644
--- a/core/include/post/list.php
+++ b/core/include/post/list.php
@@ -55,7 +55,8 @@ $ListTemplate = Template\Factory::build('post/list');
$ListTemplate->set('PAGINATION', [
'THIS' => $currentSite,
'LAST' => $lastSite,
- 'HTML' => generatePostNaviTemplate($currentSite)
+ 'HTML' => createPaginationTemplate(
+ $currentSite, $lastSite, Application::getPostURL())
]);
$ListTemplate->set('LIST', [
'POSTS' => $templates ?? []