网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 网站建设 > DedeCMS
User Name
Password
 
FAQ Members List Calendar Cheap Glasses Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1   IP: 112.84.243.12
Old 2014-03-09, 12:01 PM
topvip topvip is offline
超级版主
 
Join Date: 2006-01-04
Posts: 1206
topvip 正向着好的方向发展
Default dedecms上一篇下一篇常见修改方法

首先看一下调用标签,上一篇是{dede:prenext get=’pre’/} 下一篇是{dede:prenext get=’next’/}


一、去除上一篇和下一篇的文字,只显示标题。1.修改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>
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 10:09 PM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.