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>";这一行不加任何样式标签

让arclist标签也支持currentstyle属性 完美解决的更多相关文章

  1. dede让channelartlist标签支持currentstyle属性 完美解决

    打开include\taglib\channelartlist.lib.php 找到 $pv->Fields['typeurl'] = GetOneTypeUrlA($typeids[$i]); ...

  2. dede currentstyle属性完美解决方案

    问题一.dede让channelartlist标签支持currentstyle属性 完美解决 打开include\taglib\channelartlist.lib.php找到$pv->Fiel ...

  3. DedeCMS让channelartlist支持currentstyle属性

    dedecms默认模板的channelartlist是不支持currentstyle属性的.currentstyle属性在导航中应用的比较多,可以实现循环调用栏目后,当前页<li>标签获得 ...

  4. dede织梦 arclist标签完美支持currentstyle属性

    由于客户需求,所以进行对文章的arclist标签进行设置当前样式(currentstyle),修改前记得备份. dede版本v5.7sp 找到PHP修改: include/taglib/arclist ...

  5. 解决Struts2.2.20版本的标签不支持style属性的问题

    我先把Exception错误信息贴出来:org.apache.jasper.JasperException: /WEB-INF/jsp/topicAction/addUI.jsp (line: 40, ...

  6. dedecms织梦让channelartlist标签支持currentstyle属性

    打开include\taglib\channelartlist.lib.php  大约93行 找到: $pv->Fields['typeurl'] = GetOneTypeUrlA($typei ...

  7. dedecms让channelartlist标签支持currentstyle属性方

    把dedecms中用channelartlist当导航的站很普遍,但是有的站需要用到当前页中导航样,就是随着不同的页面,导航样式也随着变化. 首先打开include\taglib\channelart ...

  8. Source Insight 3.X 插件支持utf8,完美解决中国乱码,连接到美丽的轮廓

    上次SI多标签插件之后,由于公司内部编码改为utf8编码,因此特意做了这个Source Insight 3.X utf8插件. 下载地址:http://pan.baidu.com/s/1mgyZous ...

  9. dede的织梦问答模块也可以支持arclist标签

    dedecms织梦问答等模块支持arclist标签,实现随机调用其他栏目文章 就是让模块模板文件支持调用主站的模板,因为调用主站下的/templets/default/模板,也就实现了支持调用所有标签 ...

随机推荐

  1. IOS开发---菜鸟学习之路--(十九)-利用NSUserDefaults存储数据

    利用NSUserDefaults的可以快速的进行本地数据存储,但是支持的格式有限, 至于支持什么格式大家可以再自行脑补 我这边直接讲如何使用 NSUserDefaults 分为两部分 一个是存数据 N ...

  2. 【Add Two Numbers】

    题目: You are given two linked lists representing two non-negative numbers. The digits are stored in r ...

  3. Python-S9——Day109-Git及Redis

    1.初识Git: 2.Git版本控制之stash和branch: 1.初识Git: 1.1 Git是什么? Git是一个用于帮助用户实现“版本控制”的软件: 1.2 Git安装: GIt官网:http ...

  4. 聊聊、Spring 数据源

    平时开发中我们每天都会跟数据库打交道,页面上显示的数字,图片,语音,等等都存在某个地方,而我们就是要从那个地方拿到我们想要的.现在存储数据的方式越来越多,多种多样,但用的最多的还是关系数据库.Spri ...

  5. 查看sqlserver表空间

    exec sp_msforeachtable "exec sp_spaceused '?'"

  6. [python][django学习篇][11]后台admin用户登录博客,添加文章---这一章和博客首页设计没有关系

    1 如果没有创建超级管理员账号,先要创建python manage.py createsuperuser 2 在admin后台注册模型(如果没有这一步,登录http://127.0.0.1:8000/ ...

  7. 软件包管理rpm_yum

    和文本相关的命令cat 正向显示文本tac 反向显示文本more 可以一步一步显示文本文件less 还可以往上看.几个快捷键:j(往下看), k (往上看), g(定位最上), G(定位最下), ct ...

  8. [Cocos2dx Bug] [win32] Function CCFileUtils::fullPathFromRelativeFile forget consider the path separated by '\\'

    [Cocos2dx 2.2.4] [win32平台Bug] const char* CCFileUtils::fullPathFromRelativeFile(const char *pszFilen ...

  9. HDU 1811 Rank of Tetris(并查集按秩合并+拓扑排序)

    Rank of Tetris Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) T ...

  10. [HEOI2016/TJOI2016][bzoj4554] 游戏 [建图+最大流]

    题面 传送门 思路 看到棋盘摆放和棋子冲突,再加上这么小的数据范围,你能想到什么? 网络流棋盘模型啊! 就是 把源点连到每一行,每一列连到汇点,再在中间...... 等等,这道题每行不一定全部冲突?? ...