打开include\taglib\channelartlist.lib.php  大约93行

找到:

$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='2' currentstyle='current'}  
 <li class='{dede:field.currentstyle/}'><a href='{dede:field name='typeurl'/}'>{dede:field name='typename'/}</a></li>  
 。。。  
 {/dede:channelartlist}  

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-04-18
  • 2022-12-23
  • 2021-08-15
  • 2022-12-23
  • 2022-12-23
  • 2021-06-16
猜你喜欢
  • 2021-11-09
  • 2021-12-19
  • 2021-12-27
  • 2021-06-12
  • 2022-02-14
  • 2022-12-23
相关资源
相似解决方案