修改代码: <ul><li><a href=‘{dede:global.cfg_cmsurl/}/‘ {dede:field name=typeid runphp="yes"}(@me=="")? @me=" class=‘current‘ ":@me="";{/dede:field}><span>首页</span></a></li>{dede:channel type=‘top‘ row=‘10‘ currentstyle="<li><a class=‘current‘ href=‘~typelink~‘ ~rel~><span>~typename~</span></a></li>"}<li><a href=‘[field:typeurl/]‘ [field:rel/]><span>[field:typename/]</span></a></li>{/dede:channel}</ul>
判断当前状态的代码: {dede:field name=typeid runphp="yes"}(@me=="")? @me=" class=‘current‘ ":@me="";{/dede:field}> class=‘current‘ (为被选中时的状态)
|