Home > CMS Tutorial > DEDECMS > How to remove the id in the pinyin naming rules of DEDECMS articles

How to remove the id in the pinyin naming rules of DEDECMS articles

藏色散人
Release: 2019-12-20 10:10:52
Original
2250 people have browsed it

How to remove the id in the pinyin naming rules of DEDECMS articles

How to remove the id when using the pinyin naming rules of DEDECMS articles?

How to remove the id when using the pinyin naming rules of DEDECMS articles

How to remove the id when using the pinyin naming rules of DEDECMS articles. Friends who need it can For reference.

Recommended study: 梦Weavercms

Step one:

Select: Website column management, modify the advanced options of the column, article naming rules: {typedir}/{Y}{M}{D}/{aid}.html This is the default state

Changed aid to pinyin, but found that the static page produced still has the article id behind it.

Operating system

Second step:

Find channelunit.func.php in the include folder

Find it inside

if(ereg('\{p',$articleRule)) 
{ 
$articleRule = str_replace('{pinyin}',GetPinyin($title).'_'.$aid,$articleRule); 
$articleRule = str_replace('{py}',GetPinyin($title,1).'_'.$aid,$articleRule); 
} 
$articleUrl = '/'.ereg_replace('^/','',$articleRule); 
return $articleUrl; 
} 
} 
//获得指定类目的URL链接 
//对于使用封面文件和单独页面的情况,强制使用默认页名称
Copy after login

Pay attention to the red part: replace it with: $articleRule = str_replace('{pinyin}',GetPinyin($title),$articleRule);

The above is the detailed content of How to remove the id in the pinyin naming rules of DEDECMS articles. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template