织梦dedecms怎么限制上一篇和下一篇标题字数

92建站   织梦CMS   2021-05-11   收藏本文

本文介绍了织梦dedecms怎么限制上一篇和下一篇标题字数,解决思路:打开这个文件arc.archives.class.php,在里面添加$preRow[ title ]=cn_substr($preRow[ title ],30);和$nextRow[ title ]=cn_substr($nextRow[ title ],30);就可以了。

旺铺招租1 旺铺招租2 旺铺招租3

织梦dedecms怎么限制上一篇和下一篇标题字数?一起来看看处理办法。

解决方案:

打开include/arc.archives.class.php文件,查找:

$this->PreNext['pre'] = "上一篇:{$preRow['title']} ";

在这一行上面加上以下代码:

$preRow['title']=cn_substr($preRow['title'],30);//最多显示15个汉字

查找:

$this->PreNext['next'] = "下一篇:{$nextRow['title']} ";

在这一行上面加上以下代码

$nextRow['title']=cn_substr($nextRow['title'],30);//最多显示15个汉字

然后重新生成所有页面即可。

上面就是织梦限制标题字数的介绍,若有疑问可以找小编进一步探讨交流~

旺铺招租4
旺铺招租5
展开