导航菜单 | |
{m:nav field="catid,catname,arrchildid,pclink,target" where="parentid=0" limit="20"} {loop $data $v} <li> <a{if isset($catid) && in_array($catid, explode(',', $v['arrchildid']))} class="current" {/if} href="{$v[pclink]}" target="{$v[target]}" >{$v[catname]}</a> {if is_childid($v)} {php $r = get_childcat($v['catid']);} <ul class="sub_nav"> {loop $r $v} <li><a href="{$v[pclink]}">{$v[catname]}</a></li> {/loop} </ul> {/if} </li> {/loop} | |
当前栏目,对应的菜单高亮 | {if isset($catid) && in_array($catid, explode(',', $v['arrchildid']))} class="current" {/if} |
栏目名称 | {$v[catname]} |
栏目链接 | {$v[pclink]} |
栏目打开方式(V5.8新增) | {$v[target]} |
是否有子栏目(V6.6新增) | {if is_childid($v)} {/if} |