18 lines
421 B
Smarty
18 lines
421 B
Smarty
|
{{define "breadcrumb"}}
|
||
|
<nav aria-label="breadcrumb">
|
||
|
<ol class="breadcrumb">
|
||
|
{{$data:=.}}
|
||
|
{{range $i,$el := .}}
|
||
|
{{if ($i|mod2)}}
|
||
|
{{$url:=index $data ($i|incr)}}
|
||
|
{{if eq $url "current"}}
|
||
|
<li class="breadcrumb-item active" aria-current="page">{{$el}}</li>
|
||
|
{{else}}
|
||
|
<li class="breadcrumb-item"><a href="{{$url}}">{{$el}}</a></li>
|
||
|
{{end}}
|
||
|
{{end}}
|
||
|
{{end}}
|
||
|
</ol>
|
||
|
</nav>
|
||
|
{{end}}
|