引用网友的话:
栏目导航我要这样的(希望出一个竖向栏目导航,,可自动识别所属顶级栏目)

上午在论坛看到网友需要这种效果,这种导航也较量常用到,借此时机,顺便说一下怎样做这种效果,希望对各人有所资助...
首先,我是分两个SQL标签去实现的,一个是内层的(挪用二级栏目),一个是外层的(挪用一级栏目),
先建一个内层的SQL标签:
界说名称为"栏目内循环"
盘问语句:select top 50 id,foldername from ks_class where tn='{$Param(0)}' order by folderorder
循环体:
[loop=20]
<li><a href="{$Field(id,GetInfoUrl,100,1)}">{$Field(foldername,Text,0,...,0,)}</a></li>
[/loop]
凭证网站需要,控制[loop=几多]
再看外层sql标签:
如界说名称为:外栏目
盘问语句:
select top 50 id,foldername from ks_class where tj=1 and topflag=1 and channelid=5 order by folderorder
备注:channelid=5 是指挪用商城系统下的
循环体:
<style>
.n li{height:25px;border:1px solid #DDE3FB}
.n ul{margin:0px;padding:0px}
</style>
[loop=50]
<div style="background:#DDE3FB;height:25px;line-height:25px"><strong><a href="{$Field(id,GetInfoUrl,100,1)}">{$Field(foldername,Text,0,...,0,)}</a></strong></div>
<div class="n">
<ul>
{SQL_栏目内循环({$Field(id,GetInfoUrl,100,2)})}
</ul>
</div>
[/loop]
好了,接下来把这个标签{SQL_外栏目()}插入到模板中要显示这个效果的位置生涯模板.