mirror of
https://github.com/e107inc/e107.git
synced 2025-08-22 14:13:03 +02:00
Issue #4024 - Pagination url option added to News preferences. Select between 'record' (legacy format eg. page=20, page=40 etc) or 'page' numbers (page=1, page=2 etc). Experimental - requires more testing.
This commit is contained in:
@@ -403,7 +403,16 @@ class news_front
|
||||
$this->newsUrlparms['author'] = $tp->filter($_GET['author']);
|
||||
$this->from = intval(varset($_GET['page'],0));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// New in v2.3.1 Pagination with "Page" instead of "Record".
|
||||
if(!empty($this->pref['news_pagination']) && $this->pref['news_pagination'] === 'page' && !empty($_GET['page']))
|
||||
{
|
||||
$this->from = (int) ($_GET['page'] - 1) * ITEMVIEW;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1083,7 +1092,6 @@ class news_front
|
||||
$url = rawurlencode(e107::getUrl()->create($this->route, $this->newsUrlparms));
|
||||
$parms = 'tmpl_prefix='.deftrue('NEWS_NEXTPREV_TMPL', 'default').'&total='.$news_total.'&amount='.$amount.'¤t='.$this->from.$nitems.'&url='.$url;
|
||||
|
||||
|
||||
$this->addDebug('newsUrlParms',$this->newsUrlparms);
|
||||
|
||||
$paginationSC = false;
|
||||
|
Reference in New Issue
Block a user