1
goldsmith-samples/bootstrap/content/layouts/breadcrumbs.gohtml

17 lines
548 B
Plaintext

{{define "breadcrumbs"}}
{{if and .Props.CrumbParent .Props.Crumbs}}
<div>
<nav class="breadcrumb">
{{range .Props.Crumbs.Ancestors}}
<a href="/{{.File.Path}}" class="breadcrumb-item">{{.File.Props.Title}}</a>
{{end}}
{{if .Props.Title}}
<span class="breadcrumb-item active">{{.Props.Title}}</span>
{{else if eq .Props.Layout "tag"}}
<span class="breadcrumb-item active">Tagged &ldquo;{{.Props.TagState.CurrentTag.RawName}}&rdquo;</span>
{{end}}
</nav>
</div>
{{end}}
{{end}}