<var id="xvh3p"><noframes id="xvh3p"><var id="xvh3p"></var><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing>
<var id="xvh3p"><strike id="xvh3p"><var id="xvh3p"></var></strike></var><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<span id="xvh3p"><noframes id="xvh3p"><dl id="xvh3p"></dl>
<span id="xvh3p"><noframes id="xvh3p">
<dl id="xvh3p"><noframes id="xvh3p">
<listing id="xvh3p"><noframes id="xvh3p"><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<th id="xvh3p"><strike id="xvh3p"></strike></th>
<dl id="xvh3p"><noframes id="xvh3p">
<th id="xvh3p"><noframes id="xvh3p">

观点

互联网+时代,说建站,谈运营与网络营销

织梦CMS,当前栏目高亮显示

时间:2020-12-21

不多说废话,直接上代码。
 {dede:php} 
 $GLOBALS['thisid'] = intval($refObj->Fields['id']);
 {/dede:php} 
<ul>   
 <li><a href="/" target="_blank"  {dede:php} if(!$GLOBALS['thisid']) echo "class='this'"; {/dede:php}><span>HOME</span><br />首 页</a></li> 
 {dede:channel type='top' row='7' }   
 <li><a href="[field:typeurl/]" [field:id runphp='yes'] if (@me == $GLOBALS['thisid'] ) @me = "class='this' " ;[/field:id]  target="_blank" ><span>[field:alias/]</span><br />[field:typename/]</a></li> 
{/dede:channel} 
</ul> 
以上是全部代码。下面进行说明
 
 {dede:php}  $GLOBALS['thisid'] = intval($refObj->Fields['id']); {/dede:php} 
获取当前栏目ID。
 
[field:id runphp='yes'] if (@me == $GLOBALS['thisid'] ) @me = "class='this' " ;[/field:id] 
对dede:channel标签运行PHP,如果ID相等,输出class='this'
0
首页
案例
关于
联系