在织梦dede后台调用织梦名称的时候,默认是使用栏目的全拼来作为栏目名称的,但是如果栏目很长的话,这样就会让栏目名称也变的很长,所以很多人都希望可以用拼音的首字母来作为栏目名称,修改一些文件也是可以实现的,但是记住要先保存数据。
打开dede/catalog.add.php文件
找到$toptypedir = GetPinyin(stripslashes($toptypename));
修改为 $toptypedir = GetPinyin(stripslashes($toptypename),1);
找到$typedir = $toptypedir.'/'.GetPinyin(stripslashes($v));
修改为 $typedir = $toptypedir.'/'.GetPinyin(stripslashes($v),1);
找到$toptypedir = GetPinyin(stripslashes($toptypename));
修改为 $toptypedir = GetPinyin(stripslashes($toptypename),1);
找到$typedir = GetPinyin(stripslashes($typename));
修改为 $typedir = GetPinyin(stripslashes($typename),1);
这样就可以了,然后更新一下就可以看到效果了。
本网刊登的文章均仅代表作者个人观点,并不代表本网立场。文中的论述和观点,敬请读者注意判断。
本文地址:http://www.xlkjgs.com/notes/web/8048.html