打開 /include/taglib/channelartlist.lib.php 找到
$pv->Fields['typeurl'] = GetOneTypeUrlA($typeids[$i]);
大約在93行,在它下面添加
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'] = '';
}
織夢標簽channelartlist默認是不支持多層嵌套后使用currentstyle高亮,修改一個文件可以實現(xiàn),模板里調(diào)用代碼:里面的hover
就是你的高亮樣式,
<div class="nav">
<ul>
{dede:channelartlist row=7 typeid=top currentstyle=hover}
<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>
打開 \include\taglib\channel.lib.php
搜索
global $dsql;
修改成:
global $dsql,$_sys_globals;
繼續(xù)搜索
$row['id']==$typeid
修改成:
$row['id']==$typeid || $row['id']==$_sys_globals['typeid']
]]>