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

作者:小编 分类:eyoucms仿站教程 时间:2021-04-22 浏览:

判断顶级栏目下是否有子栏目,没有则不显示(图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}


文章链接:https://eyhtml.com/xinwendongtai/159.html
文章标题:判断顶级栏目下是否有子栏目,没有则不显示
文章版权:所发布的内容,部分为原创文章,转载请注明来源,网络转载文章如有侵权请联系我们!
本文最后更新发布于2021-04-22

相关阅读

温馨提示
体育网站代建
本站即将上线大量足球直播网站 ,体育足球篮球比赛直播信号
我要查看