Permalink
Browse files

Add Bootstrap styling to breadcrumb example

  • Loading branch information...
bep committed Nov 22, 2017
1 parent c8c9601 commit 82d74e30633aad869fb41afdf9e4aa9515dce629
Showing with 3 additions and 8 deletions.
  1. +3 −8 content/content-management/sections.md
@@ -48,26 +48,21 @@ With the available [section variables and methods](#section-page-variables-and-m
{{< code file="layouts/partials/breadcrumb.html" download="breadcrumb.html" >}}
<ul>
<ol class="nav navbar-nav">
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
</ul>
</ol>
{{ define "breadcrumbnav" }}
{{ if .p1.Parent }}
{{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 ) }}
{{ else if not .p1.IsHome }}
{{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
{{ end }}
<li>
{{ if eq .p1 .p2 }}
{{ .p1.Title }}
{{ else }}
<li{{ if eq .p1 .p2 }} class="active"{{ end }}>
<a href="{{ .p1.Permalink }}">{{ .p1.Title }}</a>
{{ end }}
</li>
{{ end }}
{{< /code >}}
## Section Page Variables and Methods
Also see [Page Variables](/variables/page/).

0 comments on commit 82d74e3

Please sign in to comment.