参考:http://zhengwuku.com/jianzhan/zblogphpmian-bao-xie-dao-hang-de-wan-zheng-dai-ma-fen-xiang
<div class="breadcrumb1 borderB">
<ul>
<li>当前位置:</li>
<li><a href="{$host}" title="{$name}首页">首页</a></li>
{if $type=='category'||$type=='article'}
{php}
$html='';
function navcate($id){
global $html;
$cate = new Category;
$cate->LoadInfoByID($id);
$html ='<li><i class="fa fa-angle-right"></i> <a href="' .$cate->Url.'" title="' .$cate->Name. '">'.$cate->Name.'</a></li>'.$html;
if(($cate->ParentID)>0){
navcate($cate->ParentID);
}
}
if($type=='category'){
navcate($category->ID);
}else{
navcate($article->Category->ID);
}
global $html;
echo $html;
{/php}
{if $type=='article'}<li><i class="fa fa-angle-right"></i> <a href="{$article.Url}">正文</a></li>{/if}
{else}<li><i class="fa fa-angle-right"></i>{$title}</a></li>
{/if}
</ul>
</div>