日志样式

织梦如何定义栏目路径名为拼音缩写



DedeCMS织梦默认的栏目页使用完整拼音为保存目录,当我们遇到栏目名称比较长的时候目录名称看起来有点冗长,这时候大多数站长喜欢使用拼音首字母作为栏目的保存目录,为此搜集教程,解决DedeCMS如何定义栏目路径名为拼音缩写的问题,具体教程如下:

打开dede/catalog.add.php文件:

1、找到代码(大概在第85行):


  $toptypedir = GetPinyin(stripslashes($toptypename));
 

修改为:


  $toptypedir = GetPinyin(stripslashes($toptypename),1);

 

image.png

2、找到代码(大概在第108行):


  $typedir = $toptypedir.'/'.GetPinyin(stripslashes($v));
 

修改为:


  $typedir = $toptypedir.'/'.GetPinyin(stripslashes($v),1);
 

image.png

3、找到代码(大概在第134行):


  $toptypedir = GetPinyin(stripslashes($toptypename));
 

修改为:


  $toptypedir = GetPinyin(stripslashes($toptypename),1);

image.png

4、找到代码(大概在第187行):


  $typedir = GetPinyin(stripslashes($typename));
 

修改为:


  $typedir = GetPinyin(stripslashes($typename),1);
 

image.png

修改完成后,再新建栏目就会以拼音缩写为栏目路径了,快去试试吧!

image.png



上一篇:织梦后台SQL批量修改文章标签语法 下一篇:织梦arclist标签当前文章高亮方法