织梦CMS专题节点列表分页方法


DedeCMS专题节点内容列表怎么分页?织梦CMS专题节点列表分页方法

dedemcs模版
具体步骤:
1、打开/include/arc.specview.class.php,找到




$ctag = $this->dtp->GetTag("page");




在下面插入下面的代码:





if(!is_object($ctag))
{
$ctag = $this->dtp->GetTag(lsquo;listrsquo;);
}
注意现在代码就变成了
代码如下:
$ctag = $this->dtp->GetTag("page");
if(!is_object($ctag))
{
$ctag = $this->dtp->GetTag(lsquo;listrsquo;);
}
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);




2、在专题节点list模板页,使用下面的list数据、分页调用标记:





{dede:list pagesize=rsquo;10prime;}
[field:title/]
{/dede:list}

{dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="4Prime;/}

dedemcs标签





这里pagesize=10表示一页调用10条数据,若未设置此值则默认为20条。

更多推荐

织梦CMS专题节点列表分页方法