织梦用arclist标签设置當前文章高亮
{dede:channeltypeid=row=currentstyle="
更多精彩就在: 51免费论文网|www.jxszl.com
{/dede:channel}
注意typelink和typeurl的写法.如果用文章来做的话,就需要修改几个地方,网上有些错误的写法,织梦模版网亲自测试过,修正后分享给大家.
include/taglib/arclist.lib.php
找到
//增加对分页内容的处理
在这段前加入
$currentstyle=$ctag->GetAtt(currentstyle);
在大概I.IIIV行,找到
$tagid,$pagesize,$isweight
增加,$currentstyle也就是
$tagid,$pagesize,$isweight,$currentstyle
大概在I.VII0行,找到
$isweight=N
后面增加
,$currentstyle=
在VI.IX行,找到
$row[textlink]="
后面增加
//by织梦模板www.lolIX.cn
if($currentstyle&&$row[id]==$arcid){
$currentstyle=str_replace(~typelink~,$row[filename],$currentstyle);
$row[currentstyle]=str_replace(~typename~,$row[title],$currentstyle);
}
模板调用,具体样式请自行修改
0I.{dede:arclistcurrentstyle="
0II
0III[field:arrayrunphp=yes]
0IV
0Vif(@me[currentstyle]){
0VI
0VII@me=@me[currentstyle];
0VIII
0IX}else{
I.0
I.I.@me="
I.II
I.III}
I.IV
I.V[/field:array]
I.VI
I.VII{/dede:arclist}
原文链接:http://www.jxszl.com/biancheng/dedecms/76427.html