有子栏目显示没子栏目 显示暂无子栏目 迅睿框架 更新 2021-08-13 21:40:02 靠谱小青年 {category module=share pid=9 return=t} 有子栏目显示:<a href="{$t.url}">{$t.name}</a>没子栏目显示:暂无子栏目 {/category}如何 判断呢 谢谢
{category module=share pid=9} {if $t.child} 存在下级栏目 {else} 不存在下级栏目 {/if} {/category}{category module=share pid=9} {if $t.child} 没栏目啥也不显示 {else} 有栏目 显示这个 {/if} {/category}{if $cat.child} {loop $related $c} <li><a href="{$c.url}" class="{if in_array($catid, $c.catids)}active{/if}">{$c.name}</a></li> {/loop} {else if $parent.child} {loop $related $c} <li><a href="{$c.url}" class="{if in_array($catid, $c.catids)}active{/if}">{$c.name}</a></li> {/loop} {else} <li><a href="{$cat.url}" class="active">{$cat.name}</a></li> {/if}