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);2、在专题节点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表示一页调用10条数据,若未设置此值则默认为20条。
新闻热点
疑难解答