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

太阳渐渐往下落,它的脸涨得越来越红,红的像个大火球,把身边的云染成五颜六色。慢慢地它走到西山背后,把美丽的霞光留在遥远的天边。我们都看得目瞪口呆。我的心里在想:晚霞真美!
织梦文章列表页和搜索结果单独输出当前页码、总页码、文档总数,不是用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/}条数据

到此这篇关于织梦文章列表页和搜索结果单独输出当前页码、总页码、文档总数就介绍到这了。健康的身体是实目标的基石。更多相关织梦文章列表页和搜索结果单独输出当前页码、总页码、文档总数内容请查看相关栏目,小编编辑不易,再次感谢大家的支持!

您可能有感兴趣的文章
织梦在搜索结果页按栏目分块显示数据(无分页)

织梦dede在搜索结果页添加按栏目按模型细分数据

Dede自定义搜索结果页显示自定义字段

织梦dedecms 搜索结果按点击排序的简单修改

dede搜索结果页支持article、sql、channelartlist 等标签