
織夢全國多城市分站地區插件dedecms分站網站源碼插件dede插件城市偽靜態插件下載
織夢城市分站插件系統使用說明
溫馨提示:使用前請先備份網站,以防萬一。
1、系統設置:
核心設置—— 是否使用偽靜態:是
其他選項—— 模板引擎禁用標簽:清空,去掉PHP
性能選項——arclist標簽調用緩存:0
2、后臺-系統-SQL命令行工具中執行兩語句:
(1)將所有文檔設置為僅動態瀏覽
update dede_archives set ismake=-1
(1)將所有欄目設置為使用動態頁
update dede_arctype set isdefault=-1
3、文件覆蓋:
上傳整個mycity文件夾和.htaccess文件到根目錄;覆蓋根目錄下的dede和include兩個文檔;切記覆蓋前先備份好網站文件及數據庫,數據丟失概不負責。
/include/helpers/
-----channelunit.helper.php //偽靜態設置
/include/
----arc.listview.class.php //文章分頁
----arc.taglist.class.php //標簽分頁
----typelink.class.php //當前位置
----arc.archives.class //上一篇下一篇
/include/taglib/
----arclist.lib.php //分頁
----channel.lib.php //導航
----tag.lib.php //標簽
偽靜態設置請根據自己的環境來設置,文件中的bcloud_nginx_user.conf是百度云主機的偽靜態文件,直接上傳百度云虛擬主機就行,Nginx.txt是linux提供寶塔的偽靜態內容,復制里面的內容到偽靜態設置即可。windows的IIS可以去https://www.toolnb.com/tools/rewriteTools.html這里轉換偽靜態規則。
4、域名信息:(設置站點)
打開mycity文件夾下的index.php文件,修改文件中的域名。不需要加http
5、修改每個模板文件的頭部代碼
在需要添加分站的模板<head>和</head>之間添加以下代碼;
{dede:php}require (DEDEROOT.'/mycity/index.php');{/dede:php} //模板引用城市,必不可少的
這段代碼一定要放在頭部TDK之前,才有效。
(1)主頁模板標題改為
{dede:php}echo constant("title");{/dede:php}
格式:'分站 站群' => '北京分站|北京站群',在系統設置里的網站名稱里填入分站 站群,即可有北京分站|北京站群 這樣的效果
(2)主頁模板關鍵詞改為
{dede:php}echo constant("keywords");{/dede:php}
格式:'分站,站群' => '北京分站,北京站群'
(3)主頁模板描述改為
{dede:php}echo constant("city");{/dede:php}{dede:global.cfg_description/}
首頁TDK實例:
{dede:php}require(DEDEROOT.'/mycity/index.php');{/dede:php}
<title>{dede:php}echo constant("title");{/dede:php}</title>
<meta name="description" content="{dede:php}echo constant("city");{/dede:php}{dede:global.cfg_description/}" />
<meta name="keywords" content="
{dede:php}echo constant("keywords");{/dede:php}" />
6、修改欄目調用鏈接
所有欄目調用鏈接[field:typelink/]修改為
[field:cityurl runphp='yes']@me=constant('cityurl');[/field:cityurl]/list-[field:id/].html
欄目名稱調用[field:typename/]修改為
[field:city runphp='yes']@me=constant('city');[/field:city][field:typename/]
如果{dede:channel type=son noself=yes}這個標簽的導航高亮不好使的話,就改為
{dede:channelartlist row=7 typeid=top currentstyle=current}這樣的標簽的導航高亮
{dede:channelartlist row=7 typeid=top currentstyle=current}
{dede:field.typeurl/}{dede:field.typename/}{/dede:channelartlist}這樣調用,欄目鏈接{dede:field.typeurl/}改為:{dede:type }[field:cityurl runphp='yes']@me=constant('cityurl');[/field:cityurl]/list-[field:id/].html{/dede:type}
欄目名稱{dede:field.typename/}改為:{dede:type}[field:city runphp='yes']@me=constant('city');[/field:city][field:typename/]{/dede:type}
頭部head.htm模板里的首頁調用可以這樣寫:{dede:type }[field:cityurl runphp='yes']@me=constant('cityurl');[/field:cityurl]/index.html{/dede:type}
欄目頁TDK實例:
{dede:php}require (DEDEROOT.'/mycity/index.php');{/dede:php}
<title>{dede:php}echo constant("city");{/dede:php}{dede:field.title/}_{dede:global.cfg_webname/}</title>
<meta name="keywords" content="{dede:php}echo constant("city");{/dede:php}{dede:field name='keywords'/}" />
<meta name="description" content="{dede:php}echo constant("city");{/dede:php}{dede:field name='description' function='html2text(@me)'/}" />
7、修改文章標題和鏈接調用
所有文章標題調用鏈接[field:title/]修改為
[field:cityrunphp='yes']@me=constant('city');[/field:city][field:title/]
*看個人需求,文章標題鏈接調用可改可不改,修改了文章標題也會隨著城市的切換改變城市狀態。
所有文章調用鏈接[field:arcurl/]修改為
[field:cityurl runphp='yes']@me=constant('cityurl');[/field:cityurl]/view-[field:id/].html
內容頁文章標題{dede:field.title/}修改為:
{dede:php}echo constant("city");{/dede:php}{dede:field.title/}
文章頁TDK實例:
{dede:php}require (DEDEROOT.'/mycity/index.php');{/dede:php}
<title>{dede:php}echo constant("city");{/dede:php}{dede:field.title/}_{dede:global.cfg_webname/}</title>
<meta name="keywords" content="{dede:php}echo constant("city");{/dede:php}{dede:field.keywords/}" />
<meta name="description" content="{dede:php}echo constant("city");{/dede:php}{dede:field.description function='html2text(@me)'/}" />
8、當前位置調用
當前位置調用{dede:field name='position'/}改為
{dede:field name='position' runphp='yes'}
$st=split(' > ',@me);
$l = '';
foreach ($st as $v) {
$s = split("'>",$v);
if($s['1']){
$l.= $s['0']."'>".city.$s['1']." > ";
}
}
@me=$l;
{/dede:field}
*當前欄目點擊不能調到對應欄目,只能跳到首頁
9、調用所有城市列表
可以創建一個欄目和城市模板去調用,也可以放到自己想要調用城市的頁面,這隨意。
在需要顯示城市名的地方插入以下代碼中的一項,有兩種展示形式,
(1)全國分類城市展示
{dede:php}echo constant("link");{/dede:php}
(2)城市全部列表
{dede:php}echo constant("links");{/dede:php}
要調用城市名稱請用這個標簽調用{dede:php}echo constant("city");{/dede:php}效果看圖片
摘要提示: 本作品內容為織夢全國多城市分站地區插件dedecms分站網站源碼插件dede插件城市偽靜態插件下載,請先安裝織夢程序,還原數據庫即可給演示站一樣,絕大多數都可以在織夢后臺修改和編輯,也可以新增和刪除作品中的內容,個別logo圖片請ftp直接更換,歡迎使用織夢無憂織夢模板。
本文鏈接:http://www.heeleri.com/other/chajian/180533.html
免責聲明:本站所有織夢插件資源均來自用戶分享和網絡收集,僅供學習與參考,請勿用于商業用途,如果損害了您的權利,如果侵犯了您的權益,請聯系網站客服處理
在線下載列表
- 本地下載
- 提取密碼:無密碼
在線咨詢
x
有什么可以幫到你
//自動推送
国产欧美日韩免费一区二区_精品国产亚洲一区二区三区_亚洲制服丝袜无码av在线_国产在线国偷精品免费看
點擊咨詢
標簽云