-
財富管理培訓(xùn)咨詢類網(wǎng)站...
-
室內(nèi)設(shè)計裝修工程類網(wǎng)站...
-
旅游公司類網(wǎng)站織夢模板...
-
戀愛情感資訊類網(wǎng)站織夢...
-
花卉養(yǎng)殖資訊類網(wǎng)站織夢...
-
壓濾機過濾設(shè)備類網(wǎng)站織...
-
蔬菜水果批發(fā)類網(wǎng)站織夢...
-
金屬工藝品加工廠家類網(wǎng)...
-
齒輪設(shè)備類網(wǎng)站織夢模板...
-
中英雙語建材瓷磚裝飾類...
-
創(chuàng)業(yè)資訊博客教程類網(wǎng)站...
-
汽車銷售縱覽類網(wǎng)站織夢...
-
大理石瓷磚生產(chǎn)類網(wǎng)站織...
-
網(wǎng)站優(yōu)化快速排名類科技...
-
商用貨架展架類網(wǎng)站織夢...
-
汽車音箱喇叭低音炮類網(wǎng)...
-
電子產(chǎn)品營銷類網(wǎng)站織夢...
-
重工業(yè)機械鋼鐵類網(wǎng)站織...
-
家禽飼養(yǎng)基地類網(wǎng)站織夢...
-
玻璃制品廠家類網(wǎng)站織夢...
大家應(yīng)該都知道rel='nofllow'的作用,它是告訴搜索引擎,不要將該鏈接計入權(quán)重。
因此多數(shù)情況下,我們可以將一些不想傳遞權(quán)重的鏈接進(jìn)行nofllow處理;
例如一些非本站的鏈接,不想傳遞權(quán)重,但是又需要加在頁面中的,
像 外部鏈接、統(tǒng)計代碼、備案號鏈接、供用戶查詢的鏈接等等。
為了方便管理,直接在織夢后臺欄目里自由把控每個欄目對應(yīng)的鏈接屬性,
我們來給織夢欄目增加鏈接屬性rel="nofllow" rel="external" rel="external nofollow"和新窗口target="_blank"
rel="nofllow" (告訴搜索引擎該鏈接不計入權(quán)重)
rel="external" (告訴搜索引擎該鏈接不是本站鏈接)
rel="external nofollow" (告訴搜索引擎該鏈接不是本站鏈接也不計入權(quán)重)

實現(xiàn)教程
1、后臺-系統(tǒng)-SQL工具,執(zhí)行
ALTER TABLE `dede_arctype` ADD `nofollow` CHAR( 60 ) NOT NULL DEFAULT '';ALTER TABLE `dede_arctype` ADD `target` CHAR( 60 ) NOT NULL DEFAULT '';
2、打開 /dede/catalog_add.php 找到,大概在 239 行左右
UpDateCatCache();
在它的 上面 加入
$id = $dsql->GetLastID();$upquery = "UPDATE `dede_arctype` SET `nofollow`='$nofollow',`target`='$target' WHERE id='$id' ";$dsql->ExecuteNoneQuery($upquery);
3、打開 /dede/catalog_edit.php 找到,大概在 106 行左右
UpDateCatCache();
在它的 上面 加入
$upquery = "UPDATE `dede_arctype` SET `nofollow`='$nofollow',`target`='$target' WHERE id='$id' ";$dsql->ExecuteNoneQuery($upquery);
4、打開 /dede/templets/catalog_add.htm 找到
欄目屬性
在它上面一行的<tr>上面加入
<tr><td width="150" class='bline' height="26" style="padding-left:10px;">鏈接屬性rel:</td><td class='bline'><select name="nofollow" id="nofollow" style="width:140px;"><option value=''>請選擇屬性</option><option value='rel="external"'>external</option><option value='rel="nofollow"'>nofollow</option><option value='rel="external nofollow"'>external nofollow</option></select><input style="vertical-align:middle; margin-top:-2px; margin-bottom:1px;" type="checkbox" name="target" value='target="_blank"' class="np">新窗口打開</td></tr>
如圖

5、打開 /dede/templets/catalog_edit.htm 找到
欄目屬性
在它上面一行的<tr>上面加入
<tr><td width="150" class='bline' height="26" style="padding-left:10px;">鏈接屬性rel:</td><td class='bline'><select name="nofollow" id="nofollow" style="width:140px;"><option value=''<?php if($myrow['nofollow']=='') echo " selected";?>>請選擇屬性</option><option value='rel="external"'<?php if($myrow['nofollow']=='rel="external"') echo " selected";?>>external</option><option value='rel="nofollow"'<?php if($myrow['nofollow']=='rel="nofollow"') echo " selected";?>>nofollow</option><option value='rel="external nofollow"'<?php if($myrow['nofollow']=='rel="external nofollow"') echo " selected";?>>external nofollow</option></select><input style="vertical-align:middle; margin-top:-2px; margin-bottom:1px;" type="checkbox" name="target" value='target="_blank"' class="np"<?php if($myrow['target']=='target="_blank"') echo " checked='1' ";?>>新窗口打開</td></tr>
如圖

6、打開 /include/taglib/channel.lib.php 找到,80、86、92、111行的
id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath
這4處都改成
*
如圖

7、打開 /include/taglib/channelartlist.lib.php 找到,大概在 78 行
id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath
改成
*
如圖

8、打開 /include/taglib/type.lib.php 找到,大概在 42 行
id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath
改成
*
如圖

欄目調(diào)用標(biāo)簽里的標(biāo)簽寫法
dede:channelartlist標(biāo)簽寫法
<ul>{dede:channelartlist row=7 typeid=top}<li><a href="{dede:field.typeurl/}" {dede:field.nofollow/} {dede:field.target/}>{dede:field.typename/}</a></li>{/dede:channelartlist}</ul>dede:channel標(biāo)簽寫法{dede:channel type=top row=7}<li><a href="[field:typelink/]" [field:nofollow/] [field:target/]>[field:typename/]</a></li>{/dede:channel}dede:type標(biāo)簽寫法{dede:type typeid=1}<li><a href="[field:typeurl/]" [field:nofollow/] [field:target/]>[field:typename/]</a></li>{/dede:type}
注意:標(biāo)紅的那2個標(biāo)簽前面記得要加個空格


