获取当前分类所在顶级分类的子分类列表
2019-09-11 13:502960
<php> $mycategory=\app\portal\service\ApiService::category($category['id']); $parent_id=$mycategory['parent_id']; if($parent_id==0) { $mycategoryid=$category['id']; } else{ $mycategoryid=$parent_id; } $mycategory2=\app\portal\service\ApiService::category($mycategoryid); $mycategoryname=$mycategory2['name']; </php> <div class="sidebar-title">{$mycategoryname}</div> <portal:subCategories categoryId="$mycategoryid" item="vo"> <a href="{:cmf_url('portal/List/index',array('id'=>$vo.id))}" title="{$vo.name}">{$vo.name}</a> </portal:subCategories>
上一篇: html转义与反转义htmlspecialchars htmlspecialchars_decode
下一篇: thinkcmf 设置跨域请求