注册 登录 欢迎您到模板精:织梦模板_dede模板_免费网站模板_网站源码下载

织梦教程_免费织梦模板下载_dede模板

该栏目分享织梦建站的基础知识,从织梦CMS的安装,到织梦标签的常规调用,以及织梦的常见问题答疑都有涉及。

当前位置:首页 > 织梦教程 >

dede标题栏目按字母首字母命名

免费网站模板 2020-09-15 10:55 织梦教程 评论
dede添加栏目的时候,默认栏目名称是拼音全称,对于一些名称很长的此语全拼就会显得***长,不仅难看,而且对于优化来说是冗长。
 
下面来说下dede标题栏目按字母首字母命名的方法。
 
打开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);