1
2
3
|
{dede:channel type='son' row='8' currentstyle="<
li
><
a
href
=
'~typelink~'
class
=
'thisclass'
>~typename~</
a
> </
li
>"}
<
li
><
a
href
=
'[field:typelink/]'
>[field:typename/]</
a
> </
li
>
{/dede:channel}
|
這種調用方式currentstyle有效
可是:php
1
2
3
|
{dede:channel type='son' row='8' typeid=1 currentstyle="<
li
><
a
href
=
'~typelink~'
class
=
'thisclass'
>~typename~</
a
> </
li
>"}
<
li
><
a
href
=
'[field:typelink/]'
>[field:typename/]</
a
> </
li
>
{/dede:channel}
|
這種調用方式currentstyle就無效了
論壇裏有人說用把typeid=xxx改爲channelid=1,簡直是無稽之談。
完美解決辦法:html
修改include/taglib/channel.lib.phpthis
1
|
if
( (
$row
[
'id'
]==
$typeid
|| (
$topid
==
$row
[
'id'
] &&
$type
==
'top'
) ) &&
$currentstyle
!=
''
)
|
改爲spa
1
|
if
( ( $row[
'id'
]== $refObj->TypeLink->TypeInfos[
'id'
] || ($topid==$row[
'id'
] && $type==
'top'
) ) && $currentstyle!=
''
)
|