eyoucms 导航菜单判断是否有子栏目,有则显示否则隐藏(二

2019-03-08  本文已影响0人  西祠_fa33

{eyou:channel type="top" row="10" id="field" currentstyle="active"}

<li class="yiji"> <a href="{$field.typeurl}" title="{$field.typename}" class="{$field.currentstyle}">{$field.typename}</a> 

 {eyou:notempty name="$field.children"}

 <div class="erji"> 

  {eyou:channel name="$field.children" row="100" id="field2"} 

   <a href="{$field2.typeurl}" class="dropdown-item ">{$field2.typename}</a> 

  {/eyou:channel}

 </div>

 {/eyou:notempty}

</li> 

{/eyou:channel}

上述代码红色部分就是判断是否隐藏二级栏目的代码,其判断为有子栏目时就显示,没有

有子栏目时就隐藏。

转自:https://www.eyoucms.com/help/eyoujq/646.html

上一篇 下一篇

猜你喜欢

热点阅读