当前位置:主页 > 网站优化 >
织梦调用上一篇下一篇以及样式修改
修改include/arc.archives.class.php 文件,查找"上一篇"关键词,将上一篇去除及可,或者大家也可以改成其它需要的文字
第三种,限制上一篇和下一篇的标题长度
1.同样是在include/arc.archives.class.php文件里面,加入如下红色代码,设置默认24个字符,中文也就是12个文字。
//获取上一篇,下一篇链接
function GetPreNext($gtype='',$titlelen=28)
2.再往下找,插入红色部分!即是用截取后的长度赋予$preRow['title2'」,那么原始没截取的就是$preRow['title'」
$preRow['namerule'」,$preRow['typedir'」,$preRow['money'」,$preRow['filename'」,$preRow['moresite'」, $preRow['siteurl'」,$preRow['sitepath'」); $preRow['title2'」=cn_substr($preRow['title'」,$titlelen); $this->PreNext['pre'」 = "上一篇:<a href='$mlink'
3.然后在前台模板就可以这样调用了。
<li style="float:left;" title="上一篇">{dede:prenext get='pre' titlelen = '18′/}</li> <li style="float:right;" title="下一篇">{dede:prenext get='next' titlelen = '18′/}</li>转发请保留本文链接:织梦调用上一篇下一篇以及样式修改 http://www.seohuizhou.com/webyouhua/5385.html