迅睿CMS框架是一款PHP8高性能·简单易用的CMS开源开发框架,基于MIT开源许可协议发布,免费且不限制商业使用,是免费开源的产品,以万端互联为设计理念,支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
联系官方销售客服
1835022288
028-61286886
"api接口数据"中,用自定义模板代码如附件(用于实现四级导航栏目数据展示),但是不正确,能帮忙看下哪里写错了吗?
170841454197b262.txt
插件教程:https://www.xunruicms.com/doc/app-361.html
{category module=share pid=0} {php $api[$key]=[];} {php $api[$key]['id']=$t['id'];} {php $api[$key]['name']=$t['name'];} {php $api[$key]['url']=$t['url'];} {php $api[$key]['next']=[];} {if $t.child} {category module=share pid=$t.id return=t2} {php $api[$key]['next'][$key_t2]=[];} {php $api[$key]['next'][$key_t2]['id']=$t2['id'];} {php $api[$key]['next'][$key_t2]['name']=$t2['name'];} {php $api[$key]['next'][$key_t2]['url']=$t2['url'];} {php $api[$key]['next'][$key_t2]['next']=[];} {if $t2.child} {category module=share pid=$t2.id return=t3} {php $api[$key]['next'][$key_t2]['next'][$key_t3]=[];} {php $api[$key]['next'][$key_t2]['next'][$key_t3]['id']=$t3['id'];} {php $api[$key]['next'][$key_t2]['next'][$key_t3]['name']=$t3['name'];} {php $api[$key]['next'][$key_t2]['next'][$key_t3]['url']=$t3['url'];} {php $api[$key]['next'][$key_t2]['next'][$key_t3]['next']=[];} {if $t3.child} {category module=share pid=$t3.id return=t4} {php $api[$key]['next'][$key_t2]['next'][$key_t3]['next'][$key_t4]=[];} {php $api[$key]['next'][$key_t2]['next'][$key_t3]['next'][$key_t4]['id']=$t4['id'];} {php $api[$key]['next'][$key_t2]['next'][$key_t3]['next'][$key_t4]['name']=$t4['name'];} {php $api[$key]['next'][$key_t2]['next'][$key_t3]['next'][$key_t4]['url']=$t4['url'];} {/category} {/if} {/category} {/if} {/category} {/if} {/category}