創(chuàng)新互聯(lián)www.cdcxhl.cn八線動態(tài)BGP香港云服務器提供商,新人活動買多久送多久,劃算不套路!
這篇文章主要介紹dedecms織夢專題節(jié)點列表內(nèi)容怎么實現(xiàn)分頁,文中介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們一定要看完!
dedecms織夢專題節(jié)點列表內(nèi)容怎么實現(xiàn)分頁?
方法:
打開/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′} [field:title/] {/dede:list} {dede:pagelist listitem=”info,index,end,pre,next,pageno” listsize=”4″/}
即可實現(xiàn)分頁,根據(jù)需要調(diào)整pagesize=’10′即可,如果未指定則默認是20。
以上是dedecms織夢專題節(jié)點列表內(nèi)容怎么實現(xiàn)分頁的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關知識,歡迎關注創(chuàng)新互聯(lián)-成都網(wǎng)站建設公司行業(yè)資訊頻道!