织梦文章列表页和搜索结果单独输出当前页码、总页码、文档总数
类别:建站知识   时间:11-03

织梦文章列表页和搜索结果单独输出当前页码、总页码、文档总数,不是用dede:sql的方式。

织梦栏目列表页实现教程

打开 /include/arc.listview.class.php 找到 (大约在673行)

else if($PageNo!=1 && $ctag->GetName()=='field' && $ctag->GetAtt('display')!='')

在它上面加入

else if($ctag->GetName()=="pageno"){$this->dtp->Assign($tagid,$this->PageNo);}else if($ctag->GetName()=="totalpage"){$this->dtp->Assign($tagid,ceil($this->TotalResult/$this->PageSize));}else if($ctag->GetName()=="totalresult"){$this->dtp->Assign($tagid,$this->TotalResult);}

如图

织梦文章列表页和搜索结果单独输出当前页码、总页码、文档总数

织梦搜索结果页实现教程

打开 /include/arc.searchview.class.php 找到 (大概在542行)

else if($tagname=="field")

在它上面加入

else if($ctag->GetName()=="pageno"){$this->dtp->Assign($tagid,$this->PageNo);}else if($ctag->GetName()=="totalpage"){$this->dtp->Assign($tagid,ceil($this->TotalResult/$this->PageSize));}else if($ctag->GetName()=="totalresult"){$this->dtp->Assign($tagid,$this->TotalResult);}

如图


织梦栏目列表模板和搜索结果页模板调用标签统一写法

当前第{dede:pageno/}页 共有{dede:totalpage/}页 共有{dede:totalresult/}条数据

智慧半岛,是一家专注于青岛网站建设青岛网站开发的青岛网络公司,Copyright ©2007-2019 Ebandao.Cn 版权所有 All Rights Reserved.(建议在1366x768以上的浏览器中访问)鲁ICP备08014496号

13153297890