Home  >  Article  >  CMS Tutorial  >  How to implement paging in the dedecms Dreamweaver topic node list content

How to implement paging in the dedecms Dreamweaver topic node list content

藏色散人
藏色散人Original
2019-12-02 09:39:462909browse

How to implement paging in the dedecms Dreamweaver topic node list content

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn