-
旅游公司類網(wǎng)站織夢(mèng)模板...
-
財(cái)富管理培訓(xùn)咨詢類網(wǎng)站...
-
齒輪設(shè)備類網(wǎng)站織夢(mèng)模板...
-
汽車音箱喇叭低音炮類網(wǎng)...
-
家禽飼養(yǎng)基地類網(wǎng)站織夢(mèng)...
-
網(wǎng)站優(yōu)化快速排名類科技...
-
重工業(yè)機(jī)械鋼鐵類網(wǎng)站織...
-
戀愛情感資訊類網(wǎng)站織夢(mèng)...
-
室內(nèi)設(shè)計(jì)裝修工程類網(wǎng)站...
-
電子產(chǎn)品營(yíng)銷類網(wǎng)站織夢(mèng)...
-
蔬菜水果批發(fā)類網(wǎng)站織夢(mèng)...
-
汽車銷售縱覽類網(wǎng)站織夢(mèng)...
-
商用貨架展架類網(wǎng)站織夢(mèng)...
-
玻璃制品廠家類網(wǎng)站織夢(mèng)...
-
金屬工藝品加工廠家類網(wǎng)...
-
中英雙語建材瓷磚裝飾類...
-
創(chuàng)業(yè)資訊博客教程類網(wǎng)站...
-
壓濾機(jī)過濾設(shè)備類網(wǎng)站織...
-
大理石瓷磚生產(chǎn)類網(wǎng)站織...
-
花卉養(yǎng)殖資訊類網(wǎng)站織夢(mèng)...
偽靜態(tài)URL
網(wǎng)站用的是靜態(tài),篩選用的是偽靜態(tài),篩選的偽靜態(tài)地址以字段和鍵值呈現(xiàn),讓篩選URL與靜態(tài)保持一致。
如:
靜態(tài)欄目頁(yè)
http://m.xmphoenix.cn/svip/
靜態(tài)欄目頁(yè)分頁(yè)
http://m.xmphoenix.cn/svip/list_1_2.html
偽靜態(tài)篩選頁(yè)
http://m.xmphoenix.cn/svip/list_1_area_0.html
偽靜態(tài)篩選分頁(yè)
http://m.xmphoenix.cn/svip/list_1_area_0_2.html
【警告】
操作之前先備份你的程序這2個(gè)文件。
/include/arc.listview.class.php
/include/extend.func.php
織夢(mèng)聯(lián)動(dòng)篩選偽靜態(tài)[單鏈接形式]+偽靜態(tài)規(guī)則 打包下載
使用說明
Ps:如果你的網(wǎng)站已經(jīng)做了篩選功能的,請(qǐng)對(duì)比一下我的文件來修改再使用。
1. 選擇對(duì)應(yīng)的編碼,把文件夾文件全部覆蓋到對(duì)應(yīng)目錄;
2. 后臺(tái)-系統(tǒng)配置 添加變量
變量名稱:cfg_rewritea
變量類型:布爾(Y/N)
參數(shù)說明:篩選偽靜態(tài)
變量值:Y
所屬組:站點(diǎn)設(shè)置

3. .htaccess 為apache偽靜態(tài),放在網(wǎng)站根目錄,用于篩選偽靜態(tài)使用,iis和nginx用戶自行轉(zhuǎn)換。
4. 設(shè)置網(wǎng)站整站為靜態(tài),生成,瀏覽網(wǎng)站帶篩選的欄目,看效果。
內(nèi)容頁(yè)輸出所屬篩選值+鏈接(支持動(dòng)態(tài)/偽靜態(tài))

打開 /nclude/extend.func.php 在最下面加入
/*** 內(nèi)容頁(yè)輸出所屬篩選值+鏈接** @access public* @param string $id 文檔id* @param string $fieldsnamef 單個(gè)篩選字段* @return string*/function GetFilterUrl($id,$fieldsnamef){global $dsql,$cfg_cmspath,$cfg_rewritea;if (!isset($id) && !is_numeric($id)){return '';}else{$arcrow = $dsql->GetOne(" Select typeid,channel From `dede_archives` where id='$id' ");$channelid = $arcrow['channel'];$tid = $arcrow['typeid'];$typerow = $dsql->GetOne(" Select typedir From `dede_arctype` where id='$tid' ");$typedir = MfTypedir($typerow["typedir"]);$channelrow = $dsql->GetOne("SELECT addtable FROM dede_channeltype where id='$channelid'");$addtable = trim($channelrow['addtable']);$fieldrow = $dsql->GetOne("SELECT $fieldsnamef FROM `$addtable` WHERE aid=$id");}$plist = $_SERVER['HTTP_X_REWRITE_URL'] ? string_filter($_SERVER['HTTP_X_REWRITE_URL']) : string_filter($_SERVER['REQUEST_URI']);if($cfg_rewritea == 'Y'){$plist = stripos($plist, "makehtml_list_action.php") ? $cfg_cmspath.$typedir.'/' : $plist;$filterarr = string_filter(stripos($plist, ".html") ? str_replace(".html", "", $plist) : $cfg_cmspath.$typedir.'/');}else{$nofilter = (isset($_REQUEST['TotalResult']) ? "&TotalResult=".$_REQUEST['TotalResult'] : '').(isset($_REQUEST['PageNo']) ? "&PageNo=".$_REQUEST['PageNo'] : '');$filterarr = string_filter(stripos($plist, "list.php?tid=") ? str_replace($nofilter, '', $plist) : $GLOBALS['cfg_cmsurl']."/plus/list.php?tid=".$tid);}$cInfos = $dsql->GetOne(" Select * From `dede_channeltype` where id='$channelid' ");$fieldset = $cInfos['fieldset'];$dtp = new DedeTagParse();$dtp->SetNameSpace('field','<','>');$dtp->LoadSource($fieldset);$result = '';if(is_array($dtp->CTags)){foreach($dtp->CTags as $tida=>$ctag){$field_name = $ctag->GetName();$fieldsname = $fieldsnamef ? explode(",", $fieldsnamef) : explode(",", $field_name);if( in_array($field_name, $fieldsname)){if($cfg_rewritea == 'Y'){$href = "";$addonfields_items = explode(",",$ctag->GetAtt('default'));$i = array_search($fieldrow[$fieldsnamef],explode(",",$ctag->GetAtt('default')));$filterarr1 = explode("list_", $filterarr);$href = $filterarr1[0]."list_".$tid.'_'.$field_name.'_'.$i;$href .= ".html";$href = str_replace(array("_".$field_name.".",".","_".$_REQUEST['TotalResult']."_".$_REQUEST['PageNo']),array(".",".",""),$href);$result .= '<a href="'.$href.'">'.$addonfields_items[$i].'</a>';}else{$addonfields_items = explode(",",$ctag->GetAtt('default'));$i = array_search($fieldrow[$fieldsnamef],explode(",",$ctag->GetAtt('default')));$href = stripos($filterarr,$ctag->GetName().'=') ? str_replace("=".$fields_value,"=".urlencode($addonfields_items[$i]),$filterarr) : $filterarr.'&'.$ctag->GetName().'='.urlencode($addonfields_items[$i]);$href = str_replace("&TotalResult=".$_REQUEST['TotalResult']."&PageNo=".$_REQUEST['PageNo'], "", $href);$result .= '<a title="'.$addonfields_items[$i].'" href="'.$href.'">'.$addonfields_items[$i].'</a>';}}}}return $result;}
內(nèi)容頁(yè)模板中調(diào)用標(biāo)簽
<small>區(qū)域:</small>{dede:field.id function=GetFilterUrl(@me,'area')/}<small>地鐵:</small>{dede:field.id function=GetFilterUrl(@me,'subway')/}
首頁(yè)/列表頁(yè)調(diào)用標(biāo)簽
區(qū)域:[field:id function=function=GetFilterUrl(@me,'area')/]地鐵:[field:id function=function=GetFilterUrl(@me,'subway')/]
注意:標(biāo)紅的地方是你的篩選字段名



