,问题:DEDE专题节点内容列表如何分页如何实?,方法:
打开/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);,这样在专题list模板页,使用,{dede:list pagesize=’10′}
<a href=”[field:arcurl/]“>[field:title/]</a>
{/dede:list}
{dede:pagelist listitem=”info,index,end,pre,next,pageno” listsize=”4″/},即可实现分页,根据需要调整pagesize=’10′即可,如果未指定则默认是20。