Modify the article and list directory rules in the dream weaving column

By default, the article and list directory rules for adding columns are:
{typedir}/{Y}/{M}{D}/{aid}'.$cfg_df_ext.
{typedir}/list_{tid}_{page}.html.

If the webmaster wants to modify it, he has to modify it every time. Is it very troublesome? Below, I will share with you how to modify the default article naming rules and list naming rules of dedecms:

1. DEDE modifies the default article naming rules
1. Add categories separately, modify the default, and modify the file: include/common.inc.php.
Find code:
//Default naming rules for documents

$art_shortname = $cfg_df_ext = '.html';
$cfg_df_namerule = '{typedir}/{Y}/{M}{D}/{aid}'.$cfg_df_ext;

2. The default modification of adding categories in batches is to modify the file: dede/templets/catalog_add_quick.htm
to find the code:

<tr>
<td height="26" class='bline'>文章命名规则:</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>

2. DEDE modifies the default list naming rules
1. Add the category separately and modify the default, modify the file: dede/templets/catalog_add.htm
to find the code:

<tr>
<td height="26">列表命名规则:</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. The default modification of adding categories in batches is to modify the file: dede/templets/catalog_add_quick.htm
to find the code:

<tr>
<td height="26">列表命名规则:</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>

Guess you like

Origin blog.csdn.net/wei741094234/article/details/109619966