用体系函数标签的栏目(频道)总导航标签可以很利便的给天生确当前栏目加上currclass,但有些状况,j9九游会必需得用sql标签来完成的话,又苦于无法给以后栏目加上currclass款式
现提供完成办法:
翻开ks_cls/kesion.label.sqlcls.asp
找到300多行,增长上面白色的代码即可
regEx.Pattern = "{\$Field\([^{\$}]*}"
regEx.IgnoreCase = True
regEx.Global = True
Set Matches = regEx.Execute(CirLabelContent)
TempStr=Replace(CirLabelContent,"{$AutoID}",N)
If Instr(tempstr,"{#GetItemUrl}")<>0 then tempstr=replace(tempstr,"{#GetItemUrl}",GetItemUrl(KS_RS_Obj))
If Instr(tempstr,"{#CurrClass}")<>0 then
if Split(KS.C_C(Fcls.RefreshFolderID,8)&",",",")(0)=KS_RS_Obj("id") or (UCase(FCls.RefreshType) = "INDEX" and N=1) then
tempstr=replace(tempstr,"{#CurrClass}"," class=""currclass""")
else
tempstr=replace(tempstr,"{#CurrClass}","")
end if
End If
For Each Match In Matches
利用办法:
在sql标签的循环体里参加{#CurrClass}标签。
如: