織夢如何實現列表頁首頁和其他頁顯示文章條數不一樣?
首先找到網站根目錄/include/ arc.listview.class.php
這里以列表首頁顯示10條,其他列表頁顯示15條為例,即
模板頁標簽
{dede:list pagesize="10"}{/dede:list} $this->PageSize = 10在里面找
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+5)-5; } $row = $this->PageSize; if($this->PageNo>1){ $row = $this->PageSize+5; }2.找到
$totalpage = ceil($this->TotalResult/$this->PageSize);//總共有兩處分別為靜態和動態
改為
$totalpage = ceil(1+($this->TotalResult-$this->PageSize)/($this->PageSize+5));
完成。
以上就是織夢如何實現列表頁首頁和其他頁顯示文章條數不一樣的全部內容,希望對大家的學習和解決疑問有所幫助,也希望大家多多支持武林網。新聞熱點
疑難解答