1
2
3
4
5
6
7
8
9
10
|
<
ul
id
=
"wos"
>
<
li
{dede:field
name
=
typeid
runphp
=
"yes"
}(@me=="")? @
me
=
" class='hover'"
:@
me
=
""
;{/dede:field}><
a
href
=
'http://songyd130.blog.163.com/blog/{dede:global.cfg_cmsurl/}/'
><
span
>主页</
span
></
a
></
li
>
{dede:channel type='top' row='10' currentstyle="<
li
class
=
'hover'
><
a
href
=
'http://songyd130.blog.163.com/blog/~typelink~'
~rel~><
span
>~typename~</
span
></
a
></
li
>"}
<
li
><
a
href
=
'http://songyd130.blog.163.com/blog/[field:typeurl/]'
[field:rel/]><
span
>[field:typename/]</
span
></
a
></
li
>
{/dede:channel}
</
ul
>
#wos { border:1px solid red;}
#wos li a{ color:#fff;}
#wos .hover { border:1px #9FF solid;}
#wos .hover a{ color:#0F0;}
|
PHP 版
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
{dede:php}
global
$dsql
;
$dsql
->SetQuery(
"select * from `#@__arctype` where reid = 6"
);
$dsql
->Execute();
$thisid
=
$refObj
-> Fields[typeid];
while
(
$row
=
$dsql
->GetArray()){
if
(
$row
[id]==
$thisid
){
echo
"<dl><dd><a href='"
.
$row
[typedir].
"' style='color:red;'>"
.
$row
[typename].
"</a></dd></dl>"
;
}
else
{
echo
"<dl><dd><a href='"
.
$row
[typedir].
"'>"
.
$row
[typename].
"</a></dd></dl>"
;
}
}
echo
$thisid
;
{/dede:php}
|
本文转自 gutaotao1989 51CTO博客,原文链接:http://blog.51cto.com/taoyouth/1422337