20 lines
695 B
HTML
20 lines
695 B
HTML
<!-- Based on https://gohugo.io/content-management/sections/#example-breadcrumb-navigation -->
|
|
|
|
<ol class="docs-breadcrumb">
|
|
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
|
|
</ol>
|
|
|
|
{{ define "breadcrumbnav" }}
|
|
<!-- Don't include the website home page in the breadcrumb. -->
|
|
{{ if and .p1.Parent (ne .p1.Parent .p1.Site.Home) }}
|
|
{{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2) }}
|
|
{{ end }}
|
|
{{ if not (isset .p1.Params "redirect_to") }}
|
|
<li {{ if eq .p1 .p2 }}class="active"{{ end }}>
|
|
<a data-track="breadcrumb" href="{{ .p1.RelPermalink }}">
|
|
{{ .p1.LinkTitle }}
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
{{ end }}
|