织梦免费模板多吗 帝国cms和织梦对比

Dreamweaver dede中显示不同数量列表页面的解决方案首先找到网站根目录/include/arc . listview . class . PHP。这里,6个项目显示在列表的第一页上,9个项目显示在其他列表页

本文最后更新时间:  2023-02-25 03:50:10

Dreamweaver dede中显示不同数量列表页面的解决方案

首先找到网站根目录/include/arc . listview . class . PHP。

这里,6个项目显示在列表的第一页上,9个项目显示在其他列表页上,例如,即

模板标签{ dede:list pagesize = ”6″}{/dede:list}

$ this->页面大小= 6

1.找到函数ParseDMFields。

往里面看

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

修改为:

01if($ctag->GetName()==”list”)02 {03 $limitstart = ($this->PageNo-1) * $this->PageSize;04 if($this->PageNo>2)05{06 $limitstart = ($this->PageNo-1) * ($this->PageSize+3)-3;07 }08 $row = $this->PageSize;09 if($this->PageNo>1)10{11 $row = $this->PageSize+3;12 }


2。查找

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


改为

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

温馨提示:内容均由网友自行发布提供,仅用于学习交流,如有版权问题,请联系我们。