欢迎来到258分享网,纯净的网络源码分享基地!

258资源分享网

全部作品
全部作品
网站源码
微信源码
素材特效
源码插件
视频教程
建站学院
热门搜索: 织梦  农业种植  农业  安全设置  官方
258资源分享 > 建站学院 > 织梦教程 > 织梦文章列表页和搜索结果单独输出当前页码、总页码、文档总数

推荐下载

HTML5响应式自适应网咯设计

2020-05-12   浏览:740

高端HTML5响应式企业通用网

2020-05-06   浏览:521

html5响应式外贸网站英文版

2020-05-08   浏览:510

HTML5自适应律师工作室类网

2020-04-04   浏览:504

HTML5影视传媒文化公司类网

2020-05-12   浏览:500

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

发布时间:2020-03-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/}条数据