## 面包屑
面包屑集中在$breadCrumb变量中,结构如下:
```
breadCrumd = [
['nid'=>'index','name'=>'首页','url'=>'http://www.xxx.com'],
['nid'=>'about','name'=>'关于我们','url'=>'http://www.xxx.com/about.html'],
],
```
* [ ] nid:导航nid
* [ ] name:名称
* [ ] url:导航链接
### 如下:
```
{if isset($breadCrumb) && !empty($breadCrumb)}
{foreach $breadCrumb as $k=>$v}
<a href="{$v['url']}" class="{$v['class']}">{$v['name']}</a>
{if $v['class'] != 'active'}>{/if}
{/foreach}
{/if}
```
### 备注:
```
{if isset($v['index']) && $v['index']=="1"}//是否存在 1表示首页
{$v['class']} 返回的是 active
{if $v['class'] != 'active'}>{/if} 标识最后一个
```