zblog分类目录面包屑的代码编写

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
当前位置:<a href="{$host}">网站首页</a>
{if $type=='category'}
{php}
$html='';
function navcate($id){
global $html;
$cate = new Category;
$cate->LoadInfoByID($id);
$html = ' > <a href="'.$cate->Url.'" title="查看'.$cate->Name.'中的全部文章">'.$cate->Name.'</a>'.$html;
if(($cate->ParentID)>0){
navcate($cate->ParentID);
}
}
navcate($category->ID);
global $html;
echo $html;
{/php}
{else}
> {$title}
{/if}