找到文件include aglibchannelartlist.lib.php
找到代码
$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 : 'current'; } else{ $pv->Fields['currentstyle'] = ''; }
使用示例:
{dede:channelartlist typeid='top' currentstyle='cur'} <li class="{dede:field.currentstyle/}">{dede:field name='typename'/}</li> {/dede:channelartlist}