zblog的面包屑路徑怎么調用
文章頁調用面包屑
當前位置:<a href="{$host}">首頁</a> {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($article->Category->ID); global $html; echo $html; {/php}
分類頁調用面包屑
當前位置:<a href="{$host}">首頁</a> {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}
通用面包屑路徑
當前位置:<a href="{$host}">首頁</a> {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);} } if($type=='category'){ navcate($category->ID);} elseif($type=='article'){ navcate($article->Category->ID); } global $html; echo $html; {/php} {if $type!='category' && $type!='index'} >> {$title} {/if}