eyoucms判斷頂級欄目下是否有子欄目,沒有則不顯示
2020-06-02
紅色代碼就是判斷代碼
{eyou:empty name="$eyou.field.typegrade"}
{eyou:empty name="$eyou.field.typegrade"}
{eyou:notempty name='$eyou.field.has_children' /}
<!--判斷當前欄目有無子欄目-->
{eyou:channel type="first" row='10' currentstyle="hover"}
<a href="{$field.typeurl}" title="{$field.typename}" class="{$field.currentstyle}">{$field.typename}</a>
{/eyou:channel}
<!--判斷當前欄目有無子欄目 end-->
{/eyou:notempty}
<!--沒有子欄目顯示的內容 end-->
{eyou:else /}
<!--有子欄目顯示的內容-->
{eyou:channel type="first" row='10' currentstyle="hover"}
<a href="{$field.typeurl}" title="{$field.typename}" class="{$field.currentstyle}">{$field.typename}</a>
{/eyou:channel}
<!--有子欄目顯示的內容 end-->
{/eyou:empty} 







