请问易优CMS判断顶级栏目下是否有子栏目,没有则不显示(1)
判断顶级栏目下是否有子栏目,没有则不显示。 红色代码就是判断代码 {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}
更新时间:2025-04-10 23:21:05
上一篇:请问PbootCMS编辑器无法上传图片:后端配置项没有正常加载,上传插件不能正常使用!
下一篇:请问宝塔如何迁移数据
转载请注明原文链接:https://www.muzicopy.com/suibi/1338.html