导航标签

# 导航标签 |名称|调用代码| |-|-| |导航名称|`{$nav.title}`| |导航副标题|`{$nav.subtitle}`| |导航封面图|`{$nav.pic}`| |导航链接|`{$nav.url}`| |链接新窗口|`{$nav.target}`| |导航子栏目|`{$nav.child}`| # 标签参数 |参数名|名称|默认|说明| |-|-|-|-| |typeid|类型|`1`|`1`主导航,`2`尾导航,`3`全部| |limit|显示数量|`10`|| # 示范调用 ## 一级导航 ```javascript <yunu:nav typeid="1" limit="100"> <li> <a href="{$nav.url}" target="{$nav.target}">{$nav.title}</a> </li> </yunu:nav> ``` ## 二级导航 ```javascript <yunu:nav typeid="1" limit="100"> <li> <a href="{$nav.url}" target="{$nav.target}">{$nav.title}</a> <volist name="nav['child']" id="v"> <ul> <li><a href="{$v.url}">{$v.title}</a></li> </ul> </volist> </li> </yunu:nav> ``` ## 三级导航 ```javascript <yunu:nav typeid="1" limit="100"> <li> <a href="{$nav.url}">{$nav.title}</a> <volist name="nav['child']" id="v"> <ul> <li> <a href="{$v.url}">{$v.title}</a> <dl class="nav-sub2"> <volist name="v['child']" id="vv"> <dd><a href="{$vv.url}" class="v3">{$vv.title}</a></dd> </volist> </dl> </li> </ul> </volist> </li> </yunu:nav> ``` ## 导航高亮的调用方法 ```javascript <?php $cateparent = 0;?> <if condition="$cid"> <yunu:catlist cid="$cid" type="parent"> <?php $cateparent = $catlist['pid'] != 0 ? $catlist['pid'] : $cateparent ;?> </yunu:catlist> </if> <?php $navpid = $cateparent ? $cateparent : $cid;?> <yunu:nav typeid='1'> <li <eq name="$nav['id']" value="$navpid">class="on"</eq>> <i class="arr"></i> <a href="{$nav.url}">{$nav.title}</a> <div class="dropdown-box"> <volist name="nav['child']" id="v"> <a href="{$v.url}">{$v.title}</a> </volist> </div> </li> </yunu:nav> ```