调用栏目下级或者同级栏目,当栏目存在下级栏目时就调用下级栏目,如果不存在下级栏目就调用当前栏目的同级栏目

适用于 search.html list.html category.html show.html page.html模板

{loop $related $c}
<li {if $c.id==$cat.id} class="active"{/if}><a href="{$c.url}">{$c.name}</a></li>
{/loop}


判断当前栏目是否含有子栏目

{if $cat.child}
有
{else}
没有
{/if}


文档最后更新时间:2019-10-12 22:51:48
我来修改此文档(1) 不会操作怎么办?