加拿大28预测开奖

信息动态

网站设计是技术与创意的完美融合!

技术资讯

织梦artlist当前文章高亮

2015-05-22 00:42:15

在织梦系统中的artlist有时🌼候需要当前文章高亮,或者和channelartlist标签套用实现当前栏目高亮和当前文章高亮,就可以通过此方法实现:

首先实现artlist当前文章高亮:

打开include\taglib\arclist.lib.php

$channelid = $ctag->GetAtt('channelid');

下增加:

$channelid = $ctag->GetAtt('channelid');

$tagid,$page༺size,$isweight 后增加 &nb♛sp;,$currentstyle

在$noꦦflag='',$tag🃏id='', $pagesize=0, $isweight='N' 后增加 ,$currentstyle=''

$row['textlink'] 𝐆= "<a href='".$row['filename']."'>".$row['ti🤪tle']."</a>";

加拿大28预测开奖:下增加

if($currentstyle && $row['id']==$arcid){

       ဣ;             $currentstyle = str_replace('~typelink~', $row['filename'], $currentstyဣle);

                    $row['currentstyle'] = str_rep🤡lace('~typename~', $row['title'], $currentstyle);

    ꦦ    &nbsꩲp;       }

加拿大28预测开奖: 

加拿大28预测开奖:模板调用:

{dede:arclist titlelen='42' row='10' currentstyꦓle="<l🌠i class='current' ><a href='~typelink~'>~typename~</a></li>"}

加拿大2✤8预测开奖:     [field:array runphp='yes'ꦿ]

         if(@me['currentstyle🉐']){

             @m🌠e = @me['currentstyle'];

加拿大🍬28预测开奖:         }else{

             @me = "<li class='abc' ><a href='{@me['arcurl']}'>{@me['title']}</a🐭></li>";

加拿大28预测开奖:         }

加拿大28预测开奖:     [/field:array]

加拿大28预测开奖:{/dede:arclist}

加拿大28预测开奖: 

加拿大28预测开奖:如果和channelartlist搭配使用,方法如下:

加拿大28预测开奖:打开include\taglib\channelartlist.lib.php

加拿大28预测开奖:找到

$pv->Fields['typeurl'] = GetOneTypeUrlA($typeid꧅s[$i]);

加拿大28预测开奖:在此行代码下方增加以下代码:

if($typeids[$i]['id'] == $refObj->TypeLink->TypeInfo💛s['id'] || $typeids[$i]['i🀅d'] == $refObj->TypeLink->TypeInfos['topid'] ){

            $pv->Fields['currentstyle'] = $currentstyle ? $currentstyle ♏: 'current';

加拿大28预测开奖:        }

加拿大28预测开奖:        else{

      &n♑bsp;  🎃;   $pv->Fields['currentstyle'] = '';

加拿大28预测开奖:        }

网上找到的一般没有加$typeids[$i]['id'] 🦂==$refObj->TypeLink->TypeInfos𒁏['topid'] 

加拿大28预测开奖:添加这个后才能对二级栏目也起作用

加拿大28预测开奖:调用方法:

{dede:channelartlist typeid='2' cu🤡rrentstyle='current'}

<li class='{dede:field.currentstyle/}'><a href='{dede:field name='typeurl'/}'>🀅;{dede:field name='typename'/}</a></li>

加拿大28预测开奖:。。。

加拿大28预测开奖:{/dede:channelartlist}

如果是当前栏目则 li的class属性显示cu🐻rrent,否则显示class='' ,也可以修改currentstyle='这里改为你需要的类名'。

加拿大28预测开奖: 

加拿大28预测开奖:这样调用:

{dede:channelartlist typeid='2' currentstyl𓄧e='current'}

<dt ><a class='{dede:field.currentstyle/}' href='{dede:fieldname='typeurl'♍/}'>{dede:field name='typename'/}</a></dt&♉gt;

{dede:arclist t🧸itlelen='42' row='10' currentstyle="<dd><a class='current' href='~typelink~'>~typename~</a></dd>"}

加拿💖大28预测开奖:    &nbs🙈p;[field:array runphp='yes']

     ꧋    if(@me[𝓀'currentstyle']){

             @me = @me🧔['currentstyle'];

加拿大28预测开奖:      &nbs🀅p;  }else{

     ܫ;       ꩵ @me = "<dd ><a href='{@me['arcurl']}'>{@me['title']}</a></dd>";

加拿大28预测开奖:         }

加拿大28预测开奖:     [/field:array]

加拿大28预测开奖:{/dede:arclist}

加拿大28预测开奖:{/dede:channelartlist}

加拿大28预测开奖: 

以上方法能够实现青岛网站建设很多树状定位结构。

 

 

 

0532-85810878 473587358 扫码添加微信

加拿大28预测开奖:扫码添加微信

扫码关注公众号

加拿大28预测开奖:官方公众号

2054585360