打开/include/taglib/channelartlist.lib.php文件
找到
$pv->Fields[‘typeurl’] = GetOneTypeUrlA($typeids[$i]);
在它下面加入
if($typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['id']){
$pv->Fields['currentstyle'] = ' class="hover"';
}
else{
$pv->Fields['currentstyle'] = '';
}
前端调用
{dede:channelartlist type='son' noself='yes' typeid='2'}
<li><a href="{dede:field name='typeurl'/}" {dede:field name='currentstyle'/}>{dede:field name='typename'/}</a></li>
{/dede:channelartlist}