分类页调用
PHP
{$cid=$category->RootID?$category->RootID:$category->ID}{if $cid}{$zbp->GetCategoryByID($cid)->Name}{foreach $categorys[$cid].SubCategorys as $categorynav}<li><a href='{$categorynav.Url}'>{$categorynav.Name}</a></li>{/foreach}{/if}
文章页调用
PHP
{$cid=$article->Category->RootID?$article->Category->RootID:$article->Category->ID}{if $cid}{$zbp->GetCategoryByID($cid)->Name}{foreach $categorys[$cid].SubCategorys as $categorynav}<li><a href='{$categorynav.Url}'>{$categorynav.Name}</a></li>{/foreach}{/if}
2个合成一个
PHP
{php}$cid=0;if($type=='category'){$cid=$category->RootID?$category->RootID:$category->ID;}elseif($type=='article'){$cid=$article->Category->RootID?$article->Category->RootID:$article->Category->ID;}{/php}{if $cid}{$zbp->GetCategoryByID($cid)->Name}{foreach $categorys[$cid].SubCategorys as $categorynav}<li><a href='{$categorynav.Url}'>{$categorynav.Name}</a></li>{/foreach}{/if}