导航标签用于生成前台导航
# nav标签
| 参数 | 含义 | 类型 | 必填 |
| --- | --- | --- | --- |
| id | 循环变量 | string | 是 |
| cid | 上级分类id或可以使用变量 | int | 否 |
| type | 分类模型(0:小说,1:文章,2:独立模版,3:外链) | int | 否 |
| limit | 显示数量 | int | 否 |
| empty | 为空的时候输出提示 | string | 否 |
### 可在标签中输出的变量
| 变量 | 含义 |
| --- | --- |
| id | 分类id |
| title | 标题 |
| pid | 上级分类id |
| url | 地址 |
| branch | 是否有下级分类 |
| current | 是否当前分类 |
| meta_title | SEO的网页标题 |
| meta_keywords | SEO关键字 |
| meta_description | SEO描述 |
| icon | icon图标 |
| template_index | 频道页模板 |
| template_detail | 详情页模板 |
| template_filter | 筛选页模板 |
| link | 外链地址 |
| type | 分类模型(0:小说,1:文章,2:独立模版,3:外链) |
## 例:
```
{nav id="vo"}
<li {eq name="vo['current']" value="1"}class="curr"{/eq}>
<a href="{$vo['url']}">{$vo['title']}</a>
</li>
{/nav}
```
![](https://img.kancloud.cn/f2/91/f2919ffb234ad4f1e22a47f0e98d6468_625x66.png)