迅睿开源框架是一款PHP8高性能·简单易用的PHP开源开发框架, 基于MIT开源许可协议发布,不限制商业使用,以多端互联为设计理念, 支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
业务经理
微信扫描以上二维码
028-61286886
在线咨询
请问,如何调用当前栏目的子栏目列表,或者如何调取所有子栏目列表?
{if $cat.child} 输出下级子栏目 {category pid=$catid return=c} 是否当前栏目:{if $c.id==$cat.id} class="active"{/if} <a href="{$c.url}">{$c.name}</a> 缩略图 {dr_thumb($c.thumb)} 栏目内容{$c.content} {/category} {else} 没有下级栏目 {/if}
{if $cat.child} 输出下级子栏目 {category pid=$catid return=c} 是否当前栏目:{if $c.id==$cat.id} class="active"{/if} <a href="{$c.url}">{$c.name}</a> 缩略图 {dr_thumb($c.thumb)} 栏目内容{$c.content} {if $c.child} 再往下 {category pid=$c.id return=c2} <a href="{$c2.url}">{$c2.name}</a> {/category} {/if} {/category} {else} 没有下级栏目 {/if}
{if $cat.child} 输出下级子栏目 {category pid=$catid return=c} 是否当前栏目:{if $c.id==$cat.id} class="active"{/if} <a href="{$c.url}">{$c.name}</a> 缩略图 {dr_thumb($c.thumb)} 栏目内容{$c.content} {/category} {else} 没有下级栏目 {/if}包含多级子栏目,能循环出来吗?{if $cat.child} 输出下级子栏目 {category pid=$catid return=c} 是否当前栏目:{if $c.id==$cat.id} class="active"{/if} <a href="{$c.url}">{$c.name}</a> 缩略图 {dr_thumb($c.thumb)} 栏目内容{$c.content} {if $c.child} 再往下 {category pid=$c.id return=c2} <a href="{$c2.url}">{$c2.name}</a> {/category} {/if} {/category} {else} 没有下级栏目 {/if}