好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁 > 網站建設 > 建站知識 > 織夢搜索頁面搜索結果總數調用方法

織夢搜索頁面搜索結果總數調用方法

POST TIME:2017-10-30 21:10

由于dedecms原生不支持搜索頁面結 果總數的調用,所以得自己修改文件來支持了。搜索頁面調用的代碼全在/include/arc.searchview.class.php里,我們先打開 /include/arc.searchview.class.php文件,然后按下面步驟修改文件

第一步:在

else if($tagname=="pagelist") 

    $list_len = trim($ctag->GetAtt("listsize")); 

    if($list_len=="") 

    { 

        $list_len = 3; 

    } 

    $this->dtp->Assign($tagid,$this->GetPageListDM($list_len)); 

}

下面添加:

else if($tagname=="itemcount") 

{    

    $list_len = trim($ctag->GetAtt("listsize"));    

    if($list_len=="")    

    { 

        $list_len = 3;    

    }    

    $this->dtp->Assign($tagid,$this->GetItemsCountDM($list_len)); 

}

第二步:在

/** 

 *  獲得當前的頁面文件的url

 * 

 * @access    public

 * @return    string

 */

前面添加下面代碼:

//————   

//搜索輸出總量   

//————   

function GetItemsCountDM($list_len)   

{     

    global $oldkeyword;     

    $pagenow = ($this->PageNo-1) * 10 + 1;     

    $pagenows = $this->PageNo*10;   //當結果超過限制時,重設結果頁數     

    if($this->TotalResult > $this->SearchMaxRc)    

    {  

        $totalpage = ceil($this->SearchMaxRc/$this->PageSize);     

    }    

    $plist .= $this->TotalResult;     

    return $plist;   

}

第三步:

在要顯示的地方加入

{dede:itemcount listsize='4'/} 即可



收縮
  • 微信客服
  • 微信二維碼
  • 電話咨詢

  • 400-1100-266