获取当前分类所在顶级分类的子分类列表


<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>