-
LED顯示屏中英雙外貿類網...
-
新媒體自媒體運營資訊類...
-
灶具電器設備類網站織夢...
-
園林綠化景觀建設類網站...
-
潮流資訊信息類網站織夢...
-
企業公司行業通用類網站...
-
車輛機油工業潤滑油類網...
-
園林景觀設計類網站織夢...
-
攝影拍攝短視頻類網站織...
-
農業機械設備類網站織夢...
-
中藥藥材百科資訊類網站...
-
道路護欄交通設施類網站...
-
水上樂園設備類網站織夢...
-
APP應用程序官網類網站織...
-
辦公學習教程資訊類網站...
-
水性工業漆類企業網站織...
-
網站建設營銷類網站織夢...
-
汽車配件類網站織夢模板...
-
環保設備研發制造類網站...
-
環保電動掃地車類網站織...
偽靜態URL
網站用的是靜態,篩選用的是偽靜態,篩選的偽靜態地址以字段和鍵值呈現,讓篩選URL與靜態保持一致。
如:
靜態欄目頁
http://www.sfmr1.cn/svip/
靜態欄目頁分頁
http://www.sfmr1.cn/svip/list_1_2.html
偽靜態篩選頁
http://www.sfmr1.cn/svip/list_1_area_0.html
偽靜態篩選分頁
http://www.sfmr1.cn/svip/list_1_area_0_2.html
【警告】
操作之前先備份你的程序這2個文件。
/include/arc.listview.class.php
/include/extend.func.php
織夢聯動篩選偽靜態[單鏈接形式]+偽靜態規則 打包下載
使用說明
Ps:如果你的網站已經做了篩選功能的,請對比一下我的文件來修改再使用。
1. 選擇對應的編碼,把文件夾文件全部覆蓋到對應目錄;
2. 后臺-系統配置 添加變量
變量名稱:cfg_rewritea
變量類型:布爾(Y/N)
參數說明:篩選偽靜態
變量值:Y
所屬組:站點設置

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

打開 /nclude/extend.func.php 在最下面加入
/*** 內容頁輸出所屬篩選值+鏈接** @access public* @param string $id 文檔id* @param string $fieldsnamef 單個篩選字段* @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;}
內容頁模板中調用標簽
<small>區域:</small>{dede:field.id function=GetFilterUrl(@me,'area')/}<small>地鐵:</small>{dede:field.id function=GetFilterUrl(@me,'subway')/}
首頁/列表頁調用標簽
區域:[field:id function=function=GetFilterUrl(@me,'area')/]地鐵:[field:id function=function=GetFilterUrl(@me,'subway')/]
注意:標紅的地方是你的篩選字段名





