adds pagination logic to C4 news

This commit is contained in:
SimonGschnell
2024-04-12 14:38:01 +02:00
parent eb05922043
commit ad956bef8e
5 changed files with 70 additions and 54 deletions
+6 -2
View File
@@ -1,6 +1,7 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
if (!defined('BASEPATH'))
exit('No direct script access allowed');
/**
*
@@ -10,6 +11,7 @@ class Cms extends FHC_Controller
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
@@ -59,7 +61,9 @@ class Cms extends FHC_Controller
*/
public function news($infoscreen = false, $studiengang_kz = null, $semester = null, $mischen = true, $titel = '', $edit = false, $sichtbar = true)
{
$news = $this->cmslib->getNews($infoscreen, $studiengang_kz, $semester, $mischen, $titel, $edit, $sichtbar);
$page = intval($this->input->get('page', true));
$pagination_size = 10;
$news = $this->cmslib->getNews($infoscreen, $studiengang_kz, $semester, $mischen, $titel, $edit, $sichtbar, $page, $pagination_size);
if (isError($news))
return $this->load->view('CisHtml/Error', ['error' => getError($news)]);