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

红色代码就是判断代码


{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}

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。