迅睿CMS框架是一款PHP8高性能·简单易用的CMS开源开发框架, 基于MIT开源许可协议发布,不限制商业使用,以多端互联为设计理念, 支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
{if $这里应该怎么写啊}
<div class="x7j3k_nav-container">
{category pid=$top.id return=c}
<a href="{$c.url}" class="x7j3k_nav-item {if $c.id==$cat.id}x7j3k_active{/if}" style="">{$c.name}</a>
{/category}
</div>
{else}
{/if}
我像在这里用个if,怎么写了cat.id不管用呢,应该怎么写呢,
{if $has_data} <div class="x7j3k_nav-container"> {category pid=$top.id return=c} <a href="{$c.url}" class="x7j3k_nav-item {if $c.id==$cat.id}x7j3k_active{/if}" style="">{$c.name}</a> {/category} </div> {/if} 判断是否显示div块, 这样写是否可以。还有什么简单办法。