织梦模板dedecms获取上一篇下一篇文章链接的代码
更多精彩就在: 51免费论文网|www.jxszl.com
r/>上I.篇地址
复制代码代码如下:
{dede:prenextget=prorunphp="yes"}
preg_match_all(/(.+?)/sim,@me,$strResult,PREG_PATTERN_ORDER);
@me=$strResult[I.][0];
{/dede:prenext}
下I.篇地址
复制代码代码如下:
{dede:prenextget=nextrunphp="yes"}
preg_match_all(/(.+?)/sim,@me,$strResult,PREG_PATTERN_ORDER);
@me=$strResult[I.][0];
{/dede:prenext}
延伸:修改上下文章字数的方法
编辑打开include/arc.archives.class.php文件
查找:$this->PreNext[pre]="上I.篇:{$preRow[title]}";
在这I.行上面加上以下代码$preRow[title]=cn_substr($preRow[title],III0);//最多显示I.V个汉字
查找:$this->PreNext[next]="下I.篇:{$nextRow[title]}";
在这I.行上面加上以下代码$nextRow[title]=cn_substr($nextRow[title],III0);//最多显示I.V个汉字
然后再重新生成所有页面即可.
原文链接:http://www.jxszl.com/biancheng/dedecms/76362.html