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
           );
其实就是在调用函数的最后加了一个$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='')
其实就是在函数后面加了一个$currentstyle=''形参
4、查找
$row['textlink'] = "<a href='".$row['filename']."'>".$row['title']."</a>";
在下面插入:
if($currentstyle && $row['id']==$arcid){
                    $currentstyle = str_replace('~typelink~', $row['filename'], $currentstyle);
                    $row['currentstyle'] = str_replace('~typename~', $row['title'], $currentstyle);
                }
保存,即可。
调用方法:
{dede:arclist titlelen='42' row='10' currentstyle="<li class='current' ><a href='~typelink~'>~typename~</a></li>"}
     [field:array runphp='yes']
         if(@me['currentstyle']){
             @me = @me['currentstyle'];
         }else{
             @me = "<li class='current' ><a href='{@me['arcurl']}'>{@me['title']}</a></li>";
         }
     [/field:array]
{/dede:arclist}
也可以与channelartlist标签(详见:http://bbs.dedecms.com/read.php?tid-559891-ds-1.html )相结合使用,
这样调用:

{dede:arclist titlelen='42' row='10' currentstyle="<li class='current'><a href='~typelink~' >~typename~</a></li>"}
     [field:array runphp='yes']
         if(@me['currentstyle']){
             @me = @me['currentstyle'];
         }else{
             @me = "<li><a href='{@me['arcurl']}'>{@me['title']}</a></li>";
         }
     [/field:array]
{/dede:arclist}
@me = "<li><a href='{@me['arcurl']}'>{@me['title']}</a></li>";这一行不加任何样式标签

最新文章

  1. 10.Configure One-to-Many(配置一对多关系)【Code-First系列】
  2. 用Charles抓取https接口数据
  3. 【POJ 1151】Atlantis
  4. HDU #2966 In case of failure
  5. yourphp内置编辑器
  6. 添加和删除hadoop集群中的节点
  7. [NOIP2011] 提高组 洛谷P1003 铺地毯
  8. hust--------The Minimum Length (最短循环节)(kmp)
  9. 利用python2.7正则表达式进行豆瓣电影Top250的网络数据采集及MySQL数据库操作
  10. Dapper使用在WCF上总是说Service找不到
  11. 怎样通过ajax提交数据
  12. SQLServer2014新功能
  13. github在windows下的安装和基本使用
  14. 描述一下Spring框架的作用和优点?
  15. Android App性能测试之一:简介
  16. jdbc连接sqlserver,mysql,oracle
  17. linux mysql 定时备份 使用crontab
  18. 理解express中的中间件
  19. 2080 特殊的质数肋骨 USACO (深度优先搜索)
  20. [Beego模型] 一、ORM 使用方法

热门文章

  1. 【Valid Sudoku】cpp
  2. maven文件报错(pom.xml或者jar包缺失)解决方法
  3. C# 中的 #region 和 #endregion 的作用
  4. c#之线程同步--轻量级同步 Interlocked
  5. Leetcode 599.两个列表的最小索引总和
  6. Linux互斥锁、条件变量和信号量
  7. java替换富文本标签等
  8. puppet实战之master-agent
  9. 【bzoj3998】[TJOI2015]弦论 后缀自动机+dp
  10. 逆向中静态分析工具——IDA初学者笔记之字符串分析