濮阳杆衣贸易有限公司

主頁 > 網(wǎng)站建設(shè) > 建站知識 > dedecms/織夢專題節(jié)點(diǎn)列表內(nèi)容實(shí)現(xiàn)分頁方法

dedecms/織夢專題節(jié)點(diǎn)列表內(nèi)容實(shí)現(xiàn)分頁方法

POST TIME:2017-11-13 00:50

問題:DEDE專題節(jié)點(diǎn)內(nèi)容列表如何分頁如何實(shí)?

方法:
打開/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);

這樣在專題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″/}

即可實(shí)現(xiàn)分頁,根據(jù)需要調(diào)整pagesize=’10′即可,如果未指定則默認(rèn)是20。



收縮
  • 微信客服
  • 微信二維碼
  • 電話咨詢

  • 400-1100-266
镇宁| 尖扎县| 增城市| 汽车| 开平市| 朝阳市| 绥芬河市| 平潭县| 合江县| 长乐市| 德昌县| 星座| 齐河县| 西华县| 保德县| 遂昌县| 普兰店市| 建昌县| 普宁市| 油尖旺区| 康定县| 湟源县| 湖北省| 温宿县| 晋中市| 新和县| 繁昌县| 禹州市| 屯门区| 高阳县| 岚皋县| 墨脱县| 威远县| 南平市| 通河县| 阜阳市| 巴林左旗| 太谷县| 阳江市| 县级市| 富裕县|