代码如下:
1
2
3
4
5
6
7
8
9
10
|
<div id=
"nav"
>
<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=
'4'
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>
//phpfensi.com
{/dede:channel}
</ul>
</div>
|
判断当前状态的代码:
1
|
{dede:field name=typeid runphp=
"yes"
}(@me==
""
)? @me=
" class='current' "
:@me=
""
;{/dede:field}>
|
本文转自 IT阿飞 51CTO博客,原文链接:http://blog.51cto.com/itafei/1893659