oef/templates/layout/breadcrumb.html.tpl

18 lines
421 B
Smarty
Raw Normal View History

2019-11-04 15:00:46 +01:00
{{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}}