获取导航父级列表标签:
<br>
示例:
~~~
{RmTop:MenuList group_id="2" limit ="8" name="vo" }
<li {if $vo.column_id == $CurrentColumnId} class="current" {/if} ><a href="{$vo.url}">{$vo.title}</a>
//判断是否存在子菜单
{if $vo.childNum != 0}
//输出子导航栏目
{RmTop:ChildMenuList pid="$vo['id']" limit ="8" name="vo_child" }
<li {if $vo_child.column_id == $CurrentColumnId} class="current" {/if} ><a href="{$vo_child.url}"> {$vo_child.title}</a></li>
{/if}
{/RmTop:ChildMenuList}
</li>
{/RmTop:MenuList}
~~~
注释:
name : 输出标签 vo
group_id : 后台分组 ID || 必填
limit : 输出条数 || 默认 8
orderBy : 默认排序规范 "sort asc"
<br>
<br>
*****
获取导航子级别菜单
~~~
{RmTop:ChildMenuList pid="2" limit ="8" name="vo_child" }
<li {if $vo_child.column_id == $CurrentColumnId} class="current" {/if} ><a href="{$vo_child.url}">{$vo_child.title}</a></li>
{/RmTop:ChildMenuList}
~~~
注释:
name : 输出标签 vo
pid : 父级ID || 必填
limit : 输出条数 || 默认 8
orderBy : 默认排序规范 "sort asc"
<br>
<br>
*****
<br>
<br>
~~~
设置当前选中的样式:
class="current" class 可以根据需求的样式修改
{if $vo.column_id == $CurrentColumnId} class="current" {/if}
~~~