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

17 lines
523 B
Plaintext
Raw Normal View History

2017-10-15 16:44:36 +00:00
{{define "breadcrumbs"}}
{{if and .Meta.CrumbParent .Meta.Crumbs}}
<div>
<nav class="breadcrumb">
{{range .Meta.Crumbs.Ancestors}}
<a href="/{{.File.Path}}" class="breadcrumb-item">{{.File.Meta.Title}}</a>
{{end}}
{{if .Meta.Title}}
<span class="breadcrumb-item active">{{.Meta.Title}}</span>
{{else if eq .Meta.Layout "tag"}}
<span class="breadcrumb-item active">Tagged &ldquo;{{.Meta.Tags.Index}}&rdquo;</span>
{{end}}
</nav>
</div>
{{end}}
{{end}}