实现方法:
打开/include/arc.specview.class.php
找到
$ctag = $this->dtp->GetTag(“page”);
在下面插入
if(!is_object($ctag)){$ctag = $this->dtp->GetTag(‘list’);}加入后就变成以下代码$ctag = $this->dtp->GetTag(“page”);if(!is_object($ctag)){$ctag = $this->dtp->GetTag(‘list’);}if(!is_object($ctag)){$this->PageSize = 20;}else{if($ctag->GetAtt(“pagesize”)!=”"){$this->PageSize = $ctag->GetAtt(“pagesize”);}else{$this->PageSize = 20;}}$this->TotalPage = ceil($this->TotalResult/$this->PageSize);
前端调用
{dede:list pagesize=’10′}<a href=”[field:arcurl/]“>[field:title/]</a>{/dede:list}{dede:pagelist listitem=”info,index,end,pre,next,pageno” listsize=”4″/}
操作完后就可以实现分页了
提醒默认是:$this->PageSize = 20; 意思就是20条个一页
前端调用了pagesize=’10′就是说10条一页