用系统函数标签的栏目(频道)总导航标签可以很方便的给生成的当前栏目加上currclass,但有些情况,我们必须得用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}标签。
如:



