加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > CMS系统 > Dedecms > 正文

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

发布时间:2020-12-14 04:21:07 所属栏目:Dedecms 来源:网络整理
导读:织梦文章列表页和搜索结果单独输出当前页码、总页码、文档总数,不是用dede:sql的方式。 织梦栏目列表页实现教程 打开 /include/arc.listview.class.php 找到 (大约在673行) else if($PageNo!=1 $ctag-GetName()=='field' $ctag-GetAtt('display')!='') 在它
织梦文章列表页和搜索结果单独输出当前页码、总页码、文档总数,不是用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->TotalResult);
}

如图



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

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

上一篇:织梦前台和后台根据联动枚举数字输出文字的方法

下一篇:织梦arclist标签idlist按指定id顺序输出文章

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读