27 lines
744 B
HTML
27 lines
744 B
HTML
{{- $page := . -}}
|
|
{{- with .Page }}{{ $page = . }}{{ end -}}
|
|
{{- $trail := slice -}}
|
|
{{- if $page -}}
|
|
{{- range $page.Ancestors.Reverse -}}
|
|
{{- if ne .RelPermalink "/" -}}
|
|
{{- $trail = $trail | append . -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- if eq $page.Kind "term" -}}
|
|
{{- with site.GetPage "taxonomy" $page.Data.Plural -}}
|
|
{{- if not (in $trail .) -}}
|
|
{{- $trail = $trail | append . -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- if gt (len $trail) 0 -}}
|
|
<nav class="breadcrumbs" aria-label="Fil d'Ariane">
|
|
<ol>
|
|
{{- range $trail -}}
|
|
<li><a href="{{ .RelPermalink }}">{{ with .LinkTitle }}{{ . }}{{ else }}{{ .Title }}{{ end }}</a></li>
|
|
{{- end -}}
|
|
</ol>
|
|
</nav>
|
|
{{- end -}}
|