易优CMS判断顶级栏目下是否有子栏目,没有则不显示

wdzsjl 2周前 (10-10) 阅读数 4 #工具收纳箱
判断顶级栏目下是否有子栏目,没有则不显示。  红色代码就是判断代码 {eyou:empty name="$eyou.field.typegrade"} <!--没有子栏目显示的内容--> {eyou:notempty name='$eyou.field.has_children' /} <!--判断当前栏目有无子栏目-->   <div class="intereste-area"> <p class="title">栏目分类</p> <div class="intereste-list">  {eyou:channel type="first" row='10' currentstyle="hover"} <a href="{$field.typeurl}" title="{$field.typename}" class="{$field.currentstyle}">{$field.typename}</a> {/eyou:channel}    </div>   </div> <!--判断当前栏目有无子栏目 end-->   {/eyou:notempty} <!--没有子栏目显示的内容 end--> {eyou:else /} <!--有子栏目显示的内容-->   <div class="intereste-area"> <p class="title">栏目分类</p> <div class="intereste-list">  {eyou:channel type="first" row='10' currentstyle="hover"} <a href="{$field.typeurl}" title="{$field.typename}" class="{$field.currentstyle}">{$field.typename}</a> {/eyou:channel}    </div>   </div> <!--有子栏目显示的内容 end--> {/eyou:empty}

 

wx.jpg ywfw.jpg
热门