1、打開 /include/arc.specview.class.php 文件
找到
$ctag = $this->dtp->GetTag("page");
在其下面添加:
if(!is_object($ctag))
{
$ctag = $this->dtp->GetTag('list');
}
注意現(xiàn)在代碼就變成了
$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、在專題節(jié)點(diǎn)list模板頁(yè),使用如下代碼即可實(shí)現(xiàn)
{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表示一頁(yè)調(diào)用10條數(shù)據(jù),若未設(shè)置此值則默認(rèn)為20條。