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

织梦系统dedecms中列表页显示条数不同的解决方法

发布时间:2020-05-22 20:44:56 所属栏目:CMS系统 来源:互联网
导读:首先找到网站根目录/include/ arc.listview.class.PHP 这里以列表首页显示6条,其他列表页显示9条为例,即 模板页标签{dede:list pagesize=6}{/dede:list} $this-PageSize = 6 1.找到函数ParseDMFields 在里面找 if($ctag-GetName()==list) { $limitstart = (

首先找到网站根目录/include/ arc.listview.class.PHP
这里以列表首页显示6条,其他列表页显示9条为例,即
模板页标签{dede:list pagesize="6"}{/dede:list}
$this->PageSize = 6

1.找到函数ParseDMFields
在里面找

if($ctag->GetName()=="list")
{
$limitstart = ($this->PageNo-1) * $this->PageSize;
$row = $this->PageSize;
修改为

if($ctag->GetName()=="list")
{
$limitstart = ($this->PageNo-1) * $this->PageSize;
if($this->PageNo>2)
{
$limitstart = ($this->PageNo-1) * ($this->PageSize+3)-3;
}
$row = $this->PageSize;
if($this->PageNo>1)
{
$row = $this->PageSize+3;
}


2.找到
$totalpage = ceil($this->TotalResult/$this->PageSize);//总共有两处分别为静态和动态
改为

$totalpage = ceil(1+($this->TotalResult-$this->PageSize)/($this->PageSize+3));

(编辑:安卓应用网)

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

    推荐文章
      热点阅读