diff options
Diffstat (limited to 'core/include/home.php')
-rw-r--r-- | core/include/home.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/include/home.php b/core/include/home.php index bc73bef..2893f0e 100644 --- a/core/include/home.php +++ b/core/include/home.php @@ -19,11 +19,18 @@ foreach($posts as $Post) { } #=============================================================================== +# Pagination +#=============================================================================== +$count = $PostRepository->getCount(); +$lastSite = ceil($count / Application::get('POST.LIST_SIZE')); + +#=============================================================================== # Build document #=============================================================================== $HomeTemplate = Template\Factory::build('home'); $HomeTemplate->set('PAGINATION', [ - 'HTML' => generatePostNaviTemplate(1) + 'HTML' => createPaginationTemplate( + 1, $lastSite, Application::getPostURL()) ]); $HomeTemplate->set('LIST', [ 'POSTS' => $templates ?? [] |