欧美大屁股bbbbxxxx,狼人大香伊蕉国产www亚洲,男ji大巴进入女人的视频小说,男人把ji大巴放进女人免费视频,免费情侣作爱视频

歡迎來到入門教程網(wǎng)!

dedecms

當(dāng)前位置:主頁 > CMS教程 > dedecms >

dedecms搜索頁面單獨(dú)調(diào)用搜索結(jié)果條數(shù)的實(shí)現(xiàn)方法

來源:本站原創(chuàng)|時(shí)間:2021-08-05|欄目:dedecms|點(diǎn)擊: 次

DEDE的搜索結(jié)果數(shù)量都集成在了列表分頁標(biāo)簽里,并沒有使用單獨(dú)的函數(shù)來提供這個(gè)結(jié)果數(shù)量,因此對有單獨(dú)調(diào)用搜索結(jié)果數(shù)量的用戶來說,就有使用問題,這里提供二次開發(fā)的方法。
 

非常簡單只要修改幾個(gè)地方就行了:
 

第一步,打開/include/arc.searchview.class.php文件,查找代碼(大概在第525行):

 

 

1 else if($tagname=="pagelist")
2 {
3         $list_len = trim($ctag->GetAtt("listsize"));
4         if($list_len=="")
5         {
6                 $list_len = 3;
7         }
8         $this->dtp->Assign($tagid,$this->GetPageListDM($list_len));
9 }

 

   

 

 

在下面添加代碼:

 

 

1 else if($tagname=="itemcount")
2 {
3         $list_len = trim($ctag->GetAtt("listsize"));
4         if($list_len=="")
5         {
6                 $list_len = 3;
7         }
8         $this->dtp->Assign($tagid,$this->GetItemsCountDM($list_len));
9 }

   

 

第二步,查找代碼(大概在第925行):

 

 

/**   * 獲得當(dāng)前的頁面文件的url   *   * @access public   * @return string   */

 

   

 

 

在其上面添加下面的這段代碼:

 

 

01 function GetItemsCountDM($list_len)
02 {
03         global $oldkeyword;
04         $pagenow = ($this->PageNo-1) * 10 + 1;
05         $pagenows = $this->PageNo*10; //當(dāng)結(jié)果超過限制時(shí),重設(shè)結(jié)果頁數(shù)
06         if($this->TotalResult > $this->SearchMaxRc)
07         {
08                 $totalpage = ceil($this->SearchMaxRc/$this->PageSize);
09         }
10         $plist .= $this->TotalResult;
11         return $plist;
12 }

   

 

 

第三步,在搜索結(jié)果頁模板里要顯示結(jié)果條數(shù)的地方通過如下標(biāo)簽調(diào)用:

 

{dede:itemcount listsize='4'/}

   

 

 

這樣就可以實(shí)現(xiàn)搜索結(jié)果頁的搜索結(jié)果數(shù)量的單獨(dú)調(diào)用了。
 

上一篇:DEDECMS遠(yuǎn)程圖片遇到Https無法本地化解決辦法

欄    目:dedecms

下一篇:dedecms織夢分頁列表添加省略號

本文標(biāo)題:dedecms搜索頁面單獨(dú)調(diào)用搜索結(jié)果條數(shù)的實(shí)現(xiàn)方法

本文地址:http://mengdiqiu.com.cn/a1/dedecms/16609.html

更多dedecms

您可能感興趣的文章

閱讀排行

本欄相關(guān)

隨機(jī)閱讀

網(wǎng)頁制作CMS教程網(wǎng)絡(luò)編程軟件編程腳本語言數(shù)據(jù)庫服務(wù)器

如果侵犯了您的權(quán)利,請與我們聯(lián)系,我們將在24小時(shí)內(nèi)進(jìn)行處理、任何非本站因素導(dǎo)致的法律后果,本站均不負(fù)任何責(zé)任。

聯(lián)系QQ:835971066 | 郵箱:835971066#qq.com(#換成@)

Copyright © 2002-2020 腳本教程網(wǎng) 版權(quán)所有