breadcrumb.html.tpl 421 B

1234567891011121314151617
  1. {{define "breadcrumb"}}
  2. <nav aria-label="breadcrumb">
  3. <ol class="breadcrumb">
  4. {{$data:=.}}
  5. {{range $i,$el := .}}
  6. {{if ($i|mod2)}}
  7. {{$url:=index $data ($i|incr)}}
  8. {{if eq $url "current"}}
  9. <li class="breadcrumb-item active" aria-current="page">{{$el}}</li>
  10. {{else}}
  11. <li class="breadcrumb-item"><a href="{{$url}}">{{$el}}</a></li>
  12. {{end}}
  13. {{end}}
  14. {{end}}
  15. </ol>
  16. </nav>
  17. {{end}}