在织梦系统中的artList有时候需要当前文章高亮,或者和channelartList标签套用实现当前栏目高亮和当前文章高亮,就可以通过此方法实现:
首先实现artList当前文章高亮:
打开include\taglib\arcList.lib.PHP
在
$channelID = $ctag->GetAtt('channelID');
下增加:
$currentstyle = $ctag->GetAtt('currentstyle');
在
$tagID,$pagesize,$isweight
后增加
,$currentstyle
在
$noflag='',$tagID='',$pagesize=0,$isweight='N'
后增加
,$currentstyle=''
在
$row['textlink'] = "href='".$row['filename']."'>".$row['Title']."
下增加
if($currentstyle && $row['ID']==$arcID){
$currentstyle = str_replace('~typelink~',$row['filename'],$currentstyle);
$row['currentstyle'] = str_replace('~typename~',$row['Title'],$currentstyle);
}
模板调用:
{dede:arcList Titlelen='42' row='10' currentborder:1px solid #EAED9C;width:660px;"> |
总结
以上是内存溢出为你收集整理的织梦dedecms使用channelartlist标签显示当前文章高亮全部内容,希望文章能够帮你解决织梦dedecms使用channelartlist标签显示当前文章高亮所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)