{eyou:channel type="son" typeid="68" row="10" id="field" currentstyle="inNACtive"} <li style="cursor: pointer;" class="{$field.currentstyle}"> <a class="pNFirst" href="{$field.typeurl}">{$field.typename} </a> {eyou:notempty name="$field.children"} {eyou:if condition='($eyou.field.typeid == 82 || $eyou.field.typeid == 86 || $eyou.field.typeid == 88)'} <div style="display:block;"> {eyou:channel name="$field.children" row="100" id="field2"} <a href="{$field2.typeurl}">{$field2.typename}</a> {/eyou:channel} </div> {/eyou:if} {/eyou:notempty} </li> {/eyou:channel}
这里我是遍历的其中某个栏目,遍历之后,判断是否有子栏目,有子栏目的话,把遍历的栏目展示出来,那些没有子栏目的不展示。