Tyepcho 输出当前文章所属分类的所有子分类

$this->widget('Widget_Metas_Category_List')->to($categories);
while($categories->next()):
    if($this->category == $categories->slug && ($this->is("post") || $this->is("category"))){
        $childrens = $this->widget('Widget_Metas_Category_List')->getAllChildren($categories->parent);
        for($i=0; $i<count($childrens); $i++) { 
            $thisChild = $this->widget('Widget_Metas_Category_List')->getCategory($childrens[$i]);
            echo '<li><a href="'.$thisChild['permalink'].'">'.$thisChild['name'].'</a></li>';
        }
    }
endwhile;
换色
阅读
登录
扫码