如何让织梦arclist标签也支持currentstyle属性

如何让织梦arclist标签也支持currentstyle属性
修改include/taglib/arclist.lib.php
1、查找到: 
$channelid = $ctag->GetAtt(’channelid’);
在下面插入:
$currentstyle = $ctag->GetAtt(’currentstyle’);
2、查找:
return lib_arclistDone 
          ( 
            $refObj, $ctag, $typeid, $ctag->GetAtt(’row’), $ctag->GetAtt(’col’), $titlelen, $infolen, 
            $ctag->GetAtt(’imgwidth’), $ctag->GetAtt(’imgheight’), $listtype, $orderby, 
            $ctag->GetAtt(’keyword’), $innertext, $envs[’aid’], $ctag->GetAtt(’idlist’), $channelid, 
            $ctag->GetAtt(’limit’), $flag,$ctag->GetAtt(’orderway’), $ctag->GetAtt(’subday’), $ctag->GetAtt(’noflag’), 
            $tagid,$pagesize,$isweight           );
替换为:
return lib_arclistDone 
          ( 
            $refObj, $ctag, $typeid, $ctag->GetAtt(’row’), $ctag->GetAtt(’col’), $titlelen, $infolen, 
            $ctag->GetAtt(’imgwidth’), $ctag->GetAtt(’imgheight’), $listtype, $orderby, 
            $ctag->GetAtt(’keyword’), $innertext, $envs[’aid’], $ctag->GetAtt(’idlist’), $channelid, 
            $ctag->GetAtt(’limit’), $flag,$ctag->GetAtt(’orderway’), $ctag->GetAtt(’subday’), $ctag->GetAtt(’noflag’), 
            $tagid,$pagesize,$isweight,$currentstyle 
          );
3、查找
function lib_arclistDone(&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlelen=30, $infolen=160, 
        $imgwidth=120, $imgheight=90, $listtype=’all’, $orderby=’default’, $keyword=’’, 
        $innertext=’’, $arcid=0, $idlist=’’, $channelid=0, $limit=’’, $att=’’, $order=’desc’, $subday=0, $noflag=’’,$tagid=’’, $pagesize=0, $isweight=’N’)
替换为:
function lib_arclistDone(&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlelen=30, $infolen=160, 
        $imgwidth=120, $imgheight=90, $listtype=’all’, $orderby=’default’, $keyword=’’, 
        $innertext=’’, $arcid=0, $idlist=’’, $channelid=0, $limit=’’, $att=’’, $order=’desc’, $subday=0, $noflag=’’,$tagid=’’, $pagesize=0, $isweight=’N’,$currentstyle=’’)
4、查找
$row[’textlink’] = "<a href=’".$row[’filename’]."’>".$row[’title’]."</a>";
在下面插入:
if($currentstyle==1){ 
                if($row[’id’]==$arcid)  $row[’arcurl’]="<li class=’focus’><a href=’".$row[’filename’]."’ style=’color:#FFF’> ".$row[’title’]." </a>"; 
                else $row[’arcurl’]="<li ><a href=’".$row[’filename’]."’ > ".$row[’title’]." </a>";}
保存,即可。
调用方法是
{dede:arclist   currentstyle=’1’}
[field:arcurl/]  
{/dede:arclist}
根据自己的选择修改第四步中的<liclass=’focus’>样式名称即可。



卖贝商城更多商品介绍:家电媒体广告投放价格     论坛灌水机    中华网汽车首页软文投放范例