dedechannelartlist currentstyle高亮显示
更多精彩就在: 51免费论文网|www.jxszl.com
artlist能顺利的将信息调出来,但是如果我们要设置当前所在栏目高亮显示的功能时,currentstyle属性将不起作用,下面我们就来解决channelartlistcurrentstyle高亮显示的问题.
I..找到/include/taglib/channelartlist.php"这个文件;
II.找到这行代码:
$pv->Fields[typeurl]=GetOneTypeUrlA($typeids[$i]);
在这行代码后加入代码:
if($typeids[$i][id]==$refObj->TypeLink->TypeInfos[id]||$typeids[$i][id]==$refObj->TypeLink->TypeInfos[topid])
{
$pv->Fields[currentstyle]=$currentstyle?$currentstyle:class="current";
}
else{
$pv->Fields[currentstyle]=;
}
IV.调用方法:
{dede:channelartlisttypeid=top}
{/dede:channelartlist}
决dede:channelartlist标签无法使用currentstyle的问题.
另外需要注意的是
原文链接:http://www.jxszl.com/biancheng/dedecms/73006.html
最新推荐