织梦默认使用拼音作为保存目录时使用中文拼音,栏名较长时长,目录名看起来有点冗长,很多站长喜欢使用拼音的首字母作为栏的保存目录,那么织梦dedecms如何使用拼音首字母作栏目名称呢?今天就来说说dedecms字母栏目名的方法。
织梦默认使用拼音作为保存目录时使用中文拼音,栏名较长时长,目录名看起来有点冗长,很多站长喜欢使用拼音的首字母作为栏的保存目录,那么织梦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字母栏目名的介绍,若有疑问可以找小编进一步探讨交流~