很多朋友在使用織夢模板時,會因為添加分類而苦惱,尤其是批量添加的時候,這時我們就必須要重新修改一下文章命名規(guī)則和列表命名規(guī)則,以便于SEO。如果進行默認值的修改,就會事半功倍。不多說。
一、DEDE5.5修改默認文章命名規(guī)則。
1、單獨添加分類默認修改,修改文件:include/common.inc.php。
查找代碼:
//文檔的默認命名規(guī)則
$art_shortname = $cfg_df_ext = '.html';
$cfg_df_namerule = '{typedir}/{Y}/{M}{D}/{aid}'.$cfg_df_ext;2、批量添加分類默認修改,修改文件:dede/templets/catalog_add_quick.htm
查找代碼:
<tr>
<td height="26" class='bline'>文章命名規(guī)則:</td>
<td class='bline'><input name="namerule" type="text" id="namerule" value="{typedir}/{Y}{M}{D}/{aid}.html" size="40" class="pubinputs" />
<img src="img/help.gif" alt="幫助" width="16" height="16" border="0" style="cursor:pointer" onClick="ShowHide('helpvar2')" /> </td>
</tr>{typedir}/{Y}{M}{D}/{aid}修改成自己需要的即可。注意修改一定要保持一致。
二、DEDE5.5修改默認列表命名規(guī)則。
這個需要修改兩個文件:
1、單獨添加分類默認修改,修改文件:dede/templets/catalog_add.htm
查找代碼:
<tr>
<td height="26">列表命名規(guī)則:</td>
<td>
<input name="namerule2" type="text" id="namerule2" value="{typedir}/list_{tid}_{page}.html" class="pubinputs" style="width:250px" />
<img src="img/help.gif" alt="幫助" width="16" height="16" border="0" style="cursor:pointer" onClick="ShowHide('helpvar3')"/></td>
</tr>2、批量添加分類默認修改,修改文件:dede/templets/catalog_add_quick.htm
查找代碼:
<tr>
<td height="26">列表命名規(guī)則:</td>
<td><input name="namerule2" type="text" id="namerule2" value="{typedir}/list_{tid}_{page}.html" size="40" class="pubinputs" />
<img src="img/help.gif" alt="幫助" width="16" height="16" border="0" style="cursor:pointer" onClick="ShowHide('helpvar3')" /></td>
</tr>{typedir}/list_{tid}_{page}修改成自己需要的即可。注意修改一定要保持一致。
|