@admin 会员自定义菜单怎么调用,如只调用插件功能模块的怎么写
{if $menu['often']['sons']}
{volist name="$menu['often']['sons']" id="vo"}
你可以这样处理,原来的代码全复制过去.
比如原来的是
{volist name="menu" id="vo"} {if count($vo.sons)==1} <div class="mui-card"> <ul class="mui-table-view"> <li class="mui-table-view-cell"><i class="{$vo.icon|default='fa fa-sun-o'}" style="color:#009900;"></i> {$vo.title}</li> {volist name="vo.sons.0.sons" id="rs"} <li class="mui-table-view-cell"> <a href="{$rs.url}" class="mui-navigate-right">{$rs.title}</a> </li> {/volist} </ul> </div> {else /} <div class="mui-card"> <ul class="mui-table-view mui-table-view-chevron"> <li class="mui-table-view-cell"><i class="{$vo.icon|default='fa fa-th-large'}" style="color:#F90;"></i> {$vo.title}<!--『』--></li> {volist name="vo.sons" id="ar"} <li class="mui-table-view-cell mui-collapse"> <a class="mui-navigate-right" href="#"> <i class="{$ar.icon|default='si si-layers'}" style="color:#009900;"></i> {$ar.title}</a> <ul class="mui-table-view mui-table-view-chevron"> {volist name="ar.sons" id="rs"} <li class="mui-table-view-cell"><a class="mui-navigate-right" href="{$rs.url}">{$rs.title}</a></li> {/volist} </ul> </li> {/volist} </ul> </div> {/if} {/volist}
然后你加个判断,就变成如下的
{volist name="menu" id="vo"} {if $key=='plugin'} {if count($vo.sons)==1} <div class="mui-card"> <ul class="mui-table-view"> <li class="mui-table-view-cell"><i class="{$vo.icon|default='fa fa-sun-o'}" style="color:#009900;"></i> {$vo.title}</li> {volist name="vo.sons.0.sons" id="rs"} <li class="mui-table-view-cell"> <a href="{$rs.url}" class="mui-navigate-right">{$rs.title}</a> </li> {/volist} </ul> </div> {else /} <div class="mui-card"> <ul class="mui-table-view mui-table-view-chevron"> <li class="mui-table-view-cell"><i class="{$vo.icon|default='fa fa-th-large'}" style="color:#F90;"></i> {$vo.title}<!--『』--></li> {volist name="vo.sons" id="ar"} <li class="mui-table-view-cell mui-collapse"> <a class="mui-navigate-right" href="#"> <i class="{$ar.icon|default='si si-layers'}" style="color:#009900;"></i> {$ar.title}</a> <ul class="mui-table-view mui-table-view-chevron"> {volist name="ar.sons" id="rs"} <li class="mui-table-view-cell"><a class="mui-navigate-right" href="{$rs.url}">{$rs.title}</a></li> {/volist} </ul> </li> {/volist} </ul> </div> {/if} {/if} {/volist}
就是加多了一个判断
{if $key=='plugin'} {/if}
你这个需求也太个性了. 为什么要这样做呢?