打造最全的CMS类教程聚合! 1、为了实现这个功能,我们首先需要获得图片页面的当前页码和总页码 编辑include/inc_archives_view.php文件 (1)找到function ParseDMFields,修改为: 1 function ParseDMFields($pageNo,$ismake=1) 2 3 { 4 5 $this-NowPage = $pageNo; 6 7 //获得当前页面编号 01 $this-Fields[ cpagenum ] = $this-NowPage; 0 […]
打造最全的CMS类教程聚合!
1、为了实现这个功能,我们首先需要获得图片页面的当前页码和总页码
编辑include/inc_archives_view.php文件
(1)找到function ParseDMFields,修改为:
1 |
function ParseDMFields($pageNo,$ismake=1) |
5 |
$this->NowPage = $pageNo; |
|
01 |
$this->Fields[ 'cpagenum' ] = $this->NowPage; |
03 |
if ($this->SplitPageField!= "" && |
05 |
isset($this->Fields[$this->SplitPageField])) |
09 |
$this->Fields[$this->SplitPageField] = $this->SplitFields[$pageNo - 1]; |
|
注意增加了如下代码用来获得当前的页码:
1 |
$this->Fields[ 'cpagenum' ] = $this->NowPage; |
|
(2)找到function __construct构造函数,修改为:
1 |
$this->TotalPage = count($this->SplitFields); |
|