<address id="bhhjf"><form id="bhhjf"><th id="bhhjf"></th></form></address>

      <address id="bhhjf"><nobr id="bhhjf"><meter id="bhhjf"></meter></nobr></address>
      <address id="bhhjf"><address id="bhhjf"><listing id="bhhjf"></listing></address></address>
      <form id="bhhjf"></form>

        <address id="bhhjf"><form id="bhhjf"><nobr id="bhhjf"></nobr></form></address>

        <address id="bhhjf"></address><noframes id="bhhjf">

        <form id="bhhjf"><th id="bhhjf"><th id="bhhjf"></th></th></form>
        <noframes id="bhhjf"><address id="bhhjf"><th id="bhhjf"></th></address>

        0712-2888027 189-8648-0214
        微信公眾號

        孝感風信網絡科技有限公司微信公眾號

        當前位置:主頁 > 技術支持 > DedeCMS > dedeCMS中如何在搜索結果頁面顯示搜索結果總數?

        dedeCMS中如何在搜索結果頁面顯示搜索結果總數?

        時間:2023-08-29來源:風信官網 點擊: 448次
        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′/} 即可
        欄目列表
        推薦內容
        熱點內容
        展開