### 导航菜单
* * * * *
>[info]四层导航调用演示
~~~
<ul>
{aspcms:navlist num=10}
<li {if:[navlist:sortid]= {aspcms:topsortid}} class="on" {end if}>
<a href="[navlist:link]">[navlist:name] | [navlist:enname]</a>
</li>
{if:[navlist:subcount]>0}
{aspcms:1navlist type=[navlist:sortid]}
<a href="[1navlist:link]">[1navlist:name] | [1navlist:enname]</a>
{aspcms:2navlist type=[1navlist:sortid]}
<a href="[2navlist:link]">[2navlist:name] | [1navlist:enname]</a>
{aspcms:3navlist type=[2navlist:sortid]}
<a href="[3navlist:link]">[3navlist:name] | [3navlist:enname]</a>
{/aspcms:3navlist}
{/aspcms:2navlist}
{/aspcms:1navlist}
{end if}
{/aspcms:navlist}
</ul>
~~~
* * * * *
>[info]基本语法
* 顶级导航调用演示
~~~
{aspcms:navlist}
<li {if:[navlist:sortid]= {aspcms:topsortid}} class="on" {end if}><a href="[navlist:link]">[navlist:name]</a></li>
{/aspcms:navlist}
~~~
* 左侧导航调用演示
~~~
{aspcms:navlist type={aspcms:topsortid}}
<li {if:[navlist:sortid]= {aspcms:topsortid}} class="on" {end if}><a href="[navlist:link]">[navlist:name]</a></li>
{/aspcms:navlist}
~~~
>[warning]区别在于type={aspcms:topsortid},用于指定父级栏目ID。
* * * * *
>[info]标签属性
| | |
| -- | -- |
| num=* | 读取栏目数量,*为数字 |
| [navlist:name] | 栏目名称 |
| [navlist:enname] | 栏目英文名称 |
| [navlist:link] | 栏目链接 |
| [navlist:i] | 计数 |
| [navlist:pic] | 栏目图片 |