婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁(yè) > 網(wǎng)站建設(shè) > 建站知識(shí) > 完美解決織夢(mèng)channelartlist標(biāo)簽不支持currentstyle屬性

完美解決織夢(mèng)channelartlist標(biāo)簽不支持currentstyle屬性

POST TIME:2017-11-13 00:13

打開(kāi)include\taglib\channelartlist.lib.php
找到

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


在此行代碼下方增加以下代碼:

if($typeids[$i]['id']==$refObj->TypeLink->TypeInfos['id']||
$typeids[$i]['id']==$refObj->TypeLink->TypeInfos['topid']){
  1. $pv->Fields['currentstyle']=$currentstyle?$currentstyle:'current';
  2. }
  3. else{
  4. $pv->Fields['currentstyle']='';
  5. }


網(wǎng)上找到的一般沒(méi)有加$typeids[$i]['id'] ==$refObj->TypeLink->TypeInfos['topid']
添加這個(gè)后才能對(duì)二級(jí)欄目也起作用
調(diào)用方法:

{dede:channelartlisttypeid='2'currentstyle='current'}
  1. <liclass='{dede:field.currentstyle/}'><ahref='{dede:fieldname='typeurl'/}'>
  2. {dede:fieldname='typename'/}</a></li>
  3. 。。。
  4. {/dede:channelartlist}


如果是當(dāng)前欄目則 li的class屬性顯示current,否則顯示class='' ,也可以修改currentstyle='這里改為你需要的類名'。



上一篇:dedecms首頁(yè)怎么調(diào)用公司簡(jiǎn)介的內(nèi)容

下一篇:讓織夢(mèng)內(nèi)容頁(yè)arclist標(biāo)簽的當(dāng)前文章標(biāo)題加亮顯示

收縮
  • 微信客服
  • 微信二維碼
  • 電話咨詢

  • 400-1100-266
主站蜘蛛池模板: 桐柏县| 德化县| 龙陵县| 万山特区| 长兴县| 封丘县| 伽师县| 盐池县| 禄劝| 常熟市| 元氏县| 文昌市| 肥西县| 巴林左旗| 罗城| 定日县| 邢台市| 盐山县| 德安县| 白朗县| 错那县| 洛浦县| 巴里| 瑞安市| 保亭| 湾仔区| 元朗区| 佛学| 塔城市| 南澳县| 横山县| 社旗县| 石林| 江山市| 枞阳县| 江源县| 雅江县| 舟山市| 长泰县| 紫云| 山东省|