濮阳杆衣贸易有限公司

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

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

POST TIME:2017-11-13 00:13

打開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)上找到的一般沒有加$typeids[$i]['id'] ==$refObj->TypeLink->TypeInfos['topid']
添加這個(gè)后才能對二級(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首頁怎么調(diào)用公司簡介的內(nèi)容

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

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

  • 400-1100-266
肃北| 房产| 湘乡市| 女性| 乌鲁木齐县| 吉水县| 弋阳县| 博野县| 昌黎县| 潼关县| 万山特区| 加查县| 宁武县| 察雅县| 当涂县| 曲松县| 兴城市| 德江县| 武功县| 关岭| 鸡西市| 巢湖市| 泰顺县| 上饶市| 高淳县| 济宁市| 神池县| 莫力| 巧家县| 武鸣县| 红安县| 抚顺县| 宜君县| 莱州市| 天柱县| 怀远县| 巴塘县| 鸡东县| 沛县| 闸北区| 定襄县|