織夢(mèng)dede:channelartlist當(dāng)前欄目高亮實(shí)現(xiàn)教程
打開 /include/taglib/channelartlist.lib.php 找到
$pv->Fields['typeurl'] = GetOneTypeUrlA($typeids[$i]);
在它下面加入
if($typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['id'] || $typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['reid'] || $typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['topid'] || $typeids[$i]['id'] == GetTopid($refObj->TypeLink->TypeInfos['id']) ) { $pv->Fields['currentstyle'] = $currentstyle ? $currentstyle : 'current'; } else { $pv->Fields['currentstyle'] = ''; }
然后 織夢(mèng)dede:channelartlist 標(biāo)簽里是高亮標(biāo)簽調(diào)用是
{dede:field.currentstyle/}
例如下面的寫法
嵌套子欄目高亮標(biāo)簽
<div class="nav"> <ul> {dede:channelartlist row=7 typeid=top currentstyle=current} <li class="{dede:field.currentstyle/}"> <a href="{dede:field.typeurl/}">{dede:field.typename/}</a> <ul> {dede:channel type='son' noself='yes' row='10' currentstyle="<li class='hover'><a href='~typelink~'>~typename~</a></li>"} <li><a href="[field:typeurl/]">[field:typename/]</a></li> {/dede:channel} </ul> </li> {/dede:channelartlist} </ul> </div>
下級(jí)欄目高亮實(shí)現(xiàn)教程
打開 /include/taglib/channel.lib.php 找到
global $dsql;
改成
global $dsql,$_sys_globals;
繼續(xù)找到
$row['id']==$typeid
改成
$row['id']==$typeid || $row['id']==$_sys_globals['typeid']
版權(quán)聲明: 本站資源均來自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!
轉(zhuǎn)載請(qǐng)注明: 織夢(mèng)channelartlist高亮并且讓嵌套標(biāo)簽里子欄目的channel也支持