織夢(mèng)CMS的列表偽靜態(tài)的設(shè)置方法,DEDE技術(shù)
導(dǎo)讀:DEDE技術(shù)DEDE技術(shù)動(dòng)態(tài)可以顯示實(shí)時(shí)信息,但靜態(tài)卻可以減少服務(wù)器資源的耗費(fèi),更因?yàn)樗阉饕娴膼酆渺o態(tài),我們很多的站長都是以靜態(tài)的方式來生成整站的。有沒有什么好的方法,可以讓魚和熊掌dede模板下載。
動(dòng)態(tài)可以顯示實(shí)時(shí)信息,但靜態(tài)卻可以減少服務(wù)器資源的耗費(fèi),更因?yàn)樗阉饕娴膼酆渺o態(tài),我們很多的站長都是以靜態(tài)的方式來生成整站的。有沒有什么好的方法,可以讓魚和熊掌兼得呢?那就需要偽靜態(tài)技術(shù)了,本節(jié)內(nèi)容將向大家介紹如何打開織夢(mèng)CMS列表的偽靜態(tài)的方法。
如何打開織夢(mèng)列表頁的偽靜態(tài)呢?下面是詳細(xì)的步驟:
打開inc_arclist_view.php 查找 //--------------------------------- //獲取動(dòng)態(tài)的分頁列表 //--------------------------------- 對(duì)比以下代碼修改 function GetPageListDM($list_len,$listitem="index,end,pre,next,pageno") { $prepage=""; $nextpage=""; $prepagenum = $this->PageNo-1; $nextpagenum = $this->PageNo+1; if($list_len==""||ereg("[^0-9]",$list_len)) $list_len=3; $totalpage = ceil($this->TotalResult/$this->PageSize); if($totalpage<=1 && $this->TotalResult>0) return "共1頁/".$this->TotalResult."條記錄"; if($this->TotalResult == 0) return "共0頁".$this->TotalResult."條記錄"; $maininfo = "共{$totalpage}頁/".$this->TotalResult."條記錄"; $purl模板織夢(mèng) = $this->GetCurUrl(); $geturl = "typeid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; $gettypeid =$this->TypeID."-"; //$hidenform = "<input type='hidden' name='typeid' value='".$this->TypeID."'>\r\n"; //$hidenform .= "<input type='hidden' name='TotalResult' value='".$this->TotalResult."'>\r\n"; $purl .= "?".$geturl; //獲得上一頁和下一頁的鏈接 if($this->PageNo != 1){ $prepage.="<a href='list-".$gettypeid."$prepagenum.html'>上一頁</a>"; $indexpage="<a href='list-".$gettypeid."1.html'>首頁</a>"; } else{ $indexpage="首頁"; } if($this->PageNo!=$totalpage && $totalpage>1){ $nextpage.="<a href='list-".$gettypeid."$nextpagenum.html'>下一頁</a>"; $endpage="<a href='list-".$gettypeid."$totalpage.html'>末頁</a>"; } else{ $endpage="末頁"; } //獲得數(shù)字鏈接 $listdd=""; $total_list = $list_len * 2 + 1; if($this->PageNo >= $total_list) { $j = $this->PageNo-$list_len; $total_list = $this->PageNo+$list_len; if($total_list>$totalpage) $total_list=$totalpage; }else{ $j=1; if($total_list>$totalpage) $total_list=$totalpage; } for($j;$j<=$total_list;$j++){ $listdd.="<a href='list-".$gettypeid."$j.html'>".$j."</a>"; } $plist .= $maininfo.$indexpage.$prepage.$listdd.$nextpage.$endpage; return $plist; } 打開inc_channel_unit_functions織夢(mèng)模板.php 查找 $reurl = $GLOBAL織夢(mèng)模板修改S["cfg_plus_dir"]."/list.php?tid=".$typeid; 改成 //$reurl = $GLOBALS["cfg_plus_dir"]."/list.php?tid=".$typeid; $reurl = "/list-".$typeid.".html"; 增加.htaccess文件 內(nèi)容為 <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^(.*)list-([0-9]+)\.html$ $1/plus/list.php?tid=$2 RewriteRule ^(.*)list-([0-9]+)-([0-9]+)\.html$ $1/plus/list.php?typeid=$2&PageNo=$3 </IfModule>
關(guān)鍵詞標(biāo)簽: 標(biāo)簽 CMS 靜態(tài)
聲明: 本文由我的SEOUC技術(shù)文章主頁發(fā)布于:2023-07-21 ,文章織夢(mèng)CMS的列表偽靜態(tài)的設(shè)置方法,DEDE技術(shù)主要講述靜態(tài),標(biāo)簽,CMS網(wǎng)站建設(shè)源碼以及服務(wù)器配置搭建相關(guān)技術(shù)文章。轉(zhuǎn)載請(qǐng)保留鏈接: http://www.bifwcx.com/article/web_32934.html
為你推薦與織夢(mèng)CMS的列表偽靜態(tài)的設(shè)置方法,DEDE技術(shù)相關(guān)的文章
-
dedecms首頁中文章列表無刷新頂、踩的實(shí)現(xiàn)
(120)人喜歡 2023-07-21 -
織夢(mèng)網(wǎng)站地圖Sitemap+百度Ping推送功能實(shí)現(xiàn)
(160)人喜歡 2023-07-21 -
DeDecms后臺(tái)設(shè)置及網(wǎng)站地圖seo優(yōu)化,織夢(mèng)技
(50)人喜歡 2023-07-21 -
DedeCMS模板制作自定義表單時(shí)添加驗(yàn)證碼的
(166)人喜歡 2023-07-21 -
織夢(mèng)標(biāo)簽:sonchannel 子欄目調(diào)用,織夢(mèng)教程
(103)人喜歡 2023-07-21 -
在織夢(mèng)cms中使用繁體轉(zhuǎn)簡體的函數(shù)BIG5To
(186)人喜歡 2023-07-21

目錄導(dǎo)航
熱門搜索標(biāo)簽 TAG全部標(biāo)簽
-
首頁
文章列表
DEDE技術(shù)
織夢(mèng)
標(biāo)簽
夢(mèng)網(wǎng)
后臺(tái)
驗(yàn)證碼
自定義
CMS
欄目
繁體
函數(shù)
標(biāo)題
類目
字段
站內(nèi)
幾種方法
下載頻道
下載地址
友情鏈接
上級(jí)
相關(guān)文章
dedecms
第一個(gè)
不能下載
正式發(fā)布
解決方法
分頁
模板
上傳圖片
歷史記錄
不支持
上傳文件
里面
縮略圖
批量
鏈接
如何解決
圖標(biāo)
如何做好
重定向
總數(shù)
搜索結(jié)果
搜索
長度
鼠標(biāo)
來實(shí)現(xiàn)
制作網(wǎng)站
轉(zhuǎn)換工具
最新熱門源碼技術(shù)文章
-
織夢(mèng)標(biāo)簽:sonchannel 子欄目調(diào)用,織
織夢(mèng)教程(=DedeCMS 3,DedeCMS 4,DedeCMS 5) 名稱: sonchannel 功能: -
在織夢(mèng)cms中使用繁體轉(zhuǎn)簡體的函數(shù)
織夢(mèng)技術(shù)在采集數(shù)據(jù)的時(shí)候,發(fā)現(xiàn)如果采集對(duì)象中存在繁體字,