|
arclist默认不支持currentstyle属性。参照channel标签的currentstyle属性的实现方法,修改了下arclist标签的系统文件。
修改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'>样式名称即可。
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即加入
x
|