dedecmsHow to achieve paging in the content of the node list of the Dream Weaver topic?
Method:
Open /include/arc.specview.class.php, find
$ctag = $this->dtp->GetTag(“page”);
and insert
below Recommended learning: 梦Weavingcms
The code is as follows:
if(!is_object($ctag)) { $ctag = $this->dtp->GetTag(‘list’); }
Note that the code now becomes
The code is as follows:
$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);
This way in the special topic For the list template page, use the
code as follows:
{dede:list pagesize=’10′} <a href=”[field:arcurl/]“>[field:title/]</a> {/dede:list} {dede:pagelist listitem=”info,index,end,pre,next,pageno” listsize=”4″/}
to achieve paging. Just adjust pagesize='10' as needed. If not specified, the default is 20.
The above is the detailed content of How to implement paging in the dedecms Dreamweaver topic node list content. For more information, please follow other related articles on the PHP Chinese website!