From f5f94531c9d5b369fdf9c287f63c41476496e5ee Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Fri, 2 Jul 2021 20:17:42 +0200 Subject: 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 --- core/include/page/list.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/include/page') diff --git a/core/include/page/list.php b/core/include/page/list.php index f7541fa..8cfbce5 100644 --- a/core/include/page/list.php +++ b/core/include/page/list.php @@ -55,7 +55,9 @@ $ListTemplate = Template\Factory::build('page/list'); $ListTemplate->set('PAGINATION', [ 'THIS' => $currentSite, 'LAST' => $lastSite, - 'HTML' => generatePageNaviTemplate($currentSite) + 'HTML' => createPaginationTemplate( + $currentSite, $lastSite, Application::getPageURL() + ) ]); $ListTemplate->set('LIST', [ 'PAGES' => $templates ?? [] -- cgit v1.2.3