国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > 織夢DEDE > 正文

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

2024-07-09 22:51:45
字體:
來源:轉載
供稿:網友

由于dedecms原生不支持搜索頁面結 果總數的調用,所以得自己修改文件來支持了。

搜索頁面調用的代碼全在/include/arc.searchview.class.php里,我們先打開 /include/arc.searchview.class.php文件,然后按下面步驟修改文件

第一步:在

  1. else if($tagname=="pagelist") 
  2. $list_len = trim($ctag->GetAtt("listsize")); 
  3. if($list_len=="") 
  4. $list_len = 3; 
  5. $this->dtp->Assign($tagid,$this->GetPageListDM($list_len)); 
  6. }
  7. 下面添加:
  8. else if($tagname=="itemcount") 
  9. {    
  10. $list_len = trim($ctag->GetAtt("listsize"));    
  11. if($list_len=="")    
  12. $list_len = 3;    
  13. }    
  14. $this->dtp->Assign($tagid,$this->GetItemsCountDM($list_len)); 
  15. }

第二步:在

  1. /** 
  2. *  獲得當前的頁面文件的url
  3. * @access    public
  4. * @return    string
  5. */

前面添加下面代碼:

  1. //————   
  2. //搜索輸出總量   
  3. //————   
  4. function GetItemsCountDM($list_len)   
  5. {     
  6. global $oldkeyword;     
  7. $pagenow = ($this->PageNo-1) * 10 + 1;     
  8. $pagenows = $this->PageNo*10;   //當結果超過限制時,重設結果頁數     
  9. if($this->TotalResult > $this->SearchMaxRc)    
  10. {  
  11. $totalpage = ceil($this->SearchMaxRc/$this->PageSize);     
  12. }    
  13. $plist .= $this->TotalResult;     
  14. return $plist;   
  15. }

第三步:

在要顯示的地方加入

  1. {dede:itemcount listsize='4'/} 即可
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 彭水| 夏津县| 吉木萨尔县| 涞源县| 汉阴县| 喜德县| 祁东县| 南宁市| 梁平县| 盘锦市| 新田县| 五峰| 周口市| 永仁县| 道孚县| 夏津县| 吴桥县| 银川市| 灵川县| 天峻县| 长岛县| 西充县| 忻州市| 鹿泉市| 榆树市| 永善县| 阿拉善右旗| 咸阳市| 林西县| 武清区| 静宁县| 湄潭县| 洱源县| 德州市| 龙门县| 分宜县| 禄丰县| 安乡县| 和平区| 普陀区| 磐石市|