dedecms織夢模板實現欄目名稱首字母做欄目鏈接的方法
Dedecms織夢程序默認使用拼音為保存目錄的時候使用的是中文全拼,當遇到欄目名稱比較長的時候目錄名稱看起來有點冗長,這時候大多數站長喜歡使用拼音首字母作為欄目的保存目錄,那么就需要修改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);
修改完成后趕快保存后添加幾個欄目頁試試吧,是不是已經搞定了欄目拼音首字母命名呢呢?
以上就是dedecms織夢模板實現欄目名稱首字母做欄目鏈接的方法的全部內容,希望對大家的學習和解決疑問有所幫助,也希望大家多多支持武林網。新聞熱點
疑難解答