织梦模板专题列表实现分页

2025-08-04 0 7
实现方法:
打开/include/arc.specview.class.php
找到
$ctag = $this->dtp->GetTag(“page”);
在下面插入
if(!is_object($ctag))
{
$ctag = $this->dtp->GetTag(‘list’);
}
加入后就变成以下代码
$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);
前端调用
{dede:list pagesize=’10′}
<a href=”[field:arcurl/]“>[field:title/]</a>
{/dede:list}
{dede:pagelist listitem=”info,index,end,pre,next,pageno” listsize=”4″/}
操作完后就可以实现分页了
提醒默认是:$this->PageSize = 20;  意思就是20条个一页
前端调用了pagesize=’10′就是说10条一页
收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

版权声明:所有的源码、软件和资料,不得使用于非法商业用途,不得违反国家法律,一切关于该资源商业行为与本站无关。

免费cms模板 dedecms教程 织梦模板专题列表实现分页 https://www.mianfeicms.com/1148.html

相关文章

发表评论
暂无评论