织梦当前栏目高亮+顶级栏目高亮
不修改程序文件实现更多高亮导航:
<a href="{dede:field.typeid runphp=yes}global $dsql;$row = $dsql->GetOne("SELECT * FROM #@_arctype WHERE id=@me");$reid = "$row[reid]"; $topid = "$row[topid]";if($reid == 0) @me = GetOneTypeUrlA($row);else $row = $dsql->GetOne("SELECT * FROM #@_arctype WHERE id=$topid");@me = GetOneTypeUrlA($row);{/dede:field.typeid}"{dede:field name=topid runphp=yes}if(@me)@me=''; else @me=' class="active"';{/dede:field}>全部</a>
{dede:channel type='son' currentstyle="<a href='~typelink~' title='~typename~' class='active'>~typename~</a>"}
<a href='[field:typelink /]' title='[field:typename/]'>[field:typename/]</a>
{/dede:channel}
|
实现效果如图:
扩展阅读:
织梦高亮显示当前导航条的javascript
织梦DEDECMS导航高亮显示