加拿大预测网-在线预测

信息动态

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

技术资讯

织梦artlist当前文章高亮

2015-05-22 00:42:15

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

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

打开include\taglib\arclist.lib.php

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

下增加:

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

$tagid,$pagesize,$🌼isweight 后增加  ,$currentstyle

在$nꦆoflag='',$tagid='', $pagesize=0, $isweight='N' 后增加 ,$currentstyle=''

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

加拿大预测网-在线预测:下增加

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

                    $currentstyle = str_replace('~typelink~', $row['filenaᩚᩚᩚᩚᩚᩚ⁤⁤⁤⁤ᩚ⁤⁤⁤⁤ᩚ⁤⁤⁤⁤ᩚ𒀱ᩚᩚᩚme'], $currentstyle);

  &n𓃲bsp;                 $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']

  &nꦬbsp;      if(@me['c🍸urrentstyle']){

 ܫ           &nbs❀p;@me = @me['currentstyle'];

加拿大预测网-在线预测:    &nbꦡsp;    }else🐈{

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

加拿大预测网-在线预测:         }

加拿大预测网-在线预测:     [/field:array]

加拿大预测网-在线预测:{/dede:arclist}

加拿大预测网-在线预测: 

加拿大预测网-在线预测:如果和channelartlist搭配使用,方法如下:

加拿大预测⭕网-在线预测:打开include\taglib\channelartlist.lib.ඣphp

加拿大预测网-在线预测:找到

$pv->Fields['typeurl'] =ไ GetOneTypeUrlA($typeids[$i]✅);

加拿大预测网-在线预测:在此行代码下方增加以下代码:

if($typeids[$i]['id'] == $refObj->TypeLink-&g🍃t;TypeInfos['id'] || $typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['t෴opid'] ){

    &nb✃sp;       $pv->Fields['currentstyle'] = $currentstyle ? $currentstyle : 'curren⛦t';

加拿大预测网-在线预测:        }

加拿大预测网-在线预测:        else{

           🌱; $pv->❀;Fields['currentstyle'] = '';

加拿大预测网-在线预测:        }

网上找到的一般没有加𓆏$typeids[$i]['id'] ==$ref🀅Obj->TypeLink->TypeInfos['topid'] 

加拿大预测网-在线预测:添加这个后才能对二级栏目也起作用

加拿大预测网-在线预测:调用方法:

{de𓆏de:channelartlist typeid='2' currentstyle='current'}

<li class='{dede:field.currentstyle/}'><a href='{dede:field name='typeurlᩚᩚᩚᩚᩚᩚ⁤⁤⁤⁤ᩚ⁤⁤⁤⁤ᩚ⁤⁤⁤⁤ᩚ𒀱ᩚᩚᩚ'/}'>{dede:field name='typename'/}</a></li🐈>

加拿大预测网-在线预测:。。。

加拿大预测网-在线预测:{/dede:channelartlist}

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

加拿大预测网-在线预测: 

加拿大预测网-在线预测:这样调用:

꧙{dede:channelartlist typeid='2' currentstyle='current'}

<dt ><a class='{dede:field.cu𒈔rrentstyle/}' href='{dede:fieldname='typeurl'/}'>{dede:field name='typename'/}</a></dt>

{dede:arclist titlelen='42' row='10' currenဣtstyle="<dd><a class='current' href='~typelink~'>~typename~</a></dd>"}

加拿大预测网-在线预测:     [field:arr♔ay runphp='yes🌺']

      &꧒nbsp;  if(@me['currentstyle']){

           𒈔  @m🍷e = @me['currentstyle'];

加拿大预测网-在线🌜预♊测:         }else{

  &🥀nbsp;          @me = "<dd ><a href='{@me['arcurl']}'>{@me['title']}</a></dd>";

加拿大预测网-在线预测:         }

加拿大预测网-在线预测:     [/field:array]

加拿大预测网-在线预测:{/dede:arclist}

加拿大预测网-在线预测:{/dede:channelartlist}

加拿大预测网-在线预测: 

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

 

 

 

0532-85810878 473587358 扫码添加微信

加拿大预测网-在线预测:扫码添加微信

扫码关注公众号

加拿大预测网-在线预测:官方公众号

2054585360