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. centOS6.6虚拟机启动后登陆界面无法显示

    1.图一和图二对比就很明显发现,我的登陆界面不见了(突然断电导致不正常关机,造成图形界面桌面崩溃) 2.解决方法:启动按Ctrl+Alt+f2切换进命令行界面,root账号进入,重新下载图形界面

  2. 【bzoj3879】SvT 后缀数组+倍增RMQ+单调栈

    题目描述 (我并不想告诉你题目名字是什么鬼) 有一个长度为n的仅包含小写字母的字符串S,下标范围为[1,n]. 现在有若干组询问,对于每一个询问,我们给出若干个后缀(以其在S中出现的起始位置来表示), ...

  3. 删除ARCSDE表空间和用户后,新建时出现error -1:O的解决办法

    对于刚开始使用arcsde的用户,可能会出现各种问题,慢慢来就会找到解决办法 当我们删除用户和表空间时,在服务器本地还保留这sde.dbf文件(删除时选择了删除本地文件,不知道为什么), 我们可以换一 ...

  4. hihoCoder [Offer收割]编程练习赛83 D 生成树问题

    题目 从 Kruskal 算法的角度来思考这个问题. 考虑 $n$ 个点的"空图"(即没有边的图). 先将 $m_2$ 条无权值的边加到图中,得到一个森林. 按边权从小到大的顺序枚 ...

  5. system权限无法访问外挂SD卡

    总结Android应用system权限无法访问SD卡问题 包括android1.6 解决方案http://hi.baidu.com/yunlongchn/item/7d6636d8547317ffca ...

  6. [暑假集训--数论]poj3518 Prime Gap

    The sequence of n − 1 consecutive composite numbers (positive integers that are not prime and not eq ...

  7. javascript 实现 接口编程

    // Constructor. var Interface = function (name, methods) { if (arguments.length != 2) { throw new Er ...

  8. Java学习之路(3)

    JKD的安装和配置: 一.适合超级菜鸟的,不用设置系统路径,不用到处找插件 (1)如果你的系统是windows或linux,根据系统的不同(32位和64位之分),先到www.baidu.com搜索jd ...

  9. Java反射获取类对象的三种方式

    package demo01; /* * 获取一个类的class文件对象的三种方式 * 1.对象获取 * 2.类名获取 * 3.Class类的静态方法获取 */ public class Reflec ...

  10. hdu 4528(搜索好题)

    小明系列故事——捉迷藏 Time Limit: 500/200 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total S ...