我們在創(chuàng)建織夢網(wǎng)站欄目的時候,尤其在使用批量創(chuàng)建網(wǎng)站欄目或者默認(rèn)自動創(chuàng)建欄目的時候,會自動獲取織夢欄目名稱的全拼作為URL路徑,當(dāng)遇到欄目名稱比較長的時候目錄名稱看起來有點(diǎn)冗長,這時候大多數(shù)站長喜歡使用拼音首字母作為欄目的保存目錄。
打開并進(jìn)行修改dede/catalog.add.php文件
85行:$toptypedir = GetPinyin(stripslashes($toptypename));
修改為:$toptypedir = GetPinyin(stripslashes($toptypename),1);
108 行:$typedir = $toptypedir.'/'.GetPinyin(stripslashes($v));
修改為:$typedir = $toptypedir.'/'.GetPinyin(stripslashes($v),1);
134行:$toptypedir = GetPinyin(stripslashes($toptypename));
修改為:$toptypedir = GetPinyin(stripslashes($toptypename),1);
187行:$typedir = GetPinyin(stripslashes($typename));
修改為:$typedir = GetPinyin(stripslashes($typename),1);
注意事項
修改完成后趕快保存去試試吧,是不是很簡單呢?作為首字母更加符合一些特殊用戶的要求了。