Skip to content

Instantly share code, notes, and snippets.

@simt2
Created February 21, 2017 08:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simt2/f930c410deb687192d23f5be9efe0fec to your computer and use it in GitHub Desktop.
Save simt2/f930c410deb687192d23f5be9efe0fec to your computer and use it in GitHub Desktop.
mesh-go-example navigation.html
{{define "navigation"}}
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a href="/" class="navbar-brand">Home</a>
</div>
<ul class="nav navbar-nav">
{{range $node := .Breadcrumb}}
{{with $category := .Get "node.schema.name" }}
{{if eq $category.String "category"}}
<li>
<a href="{{$node.Get "node.path"}}">{{$node.Get "node.fields.name"}}</a>
</li>
{{end}}
{{end}}
{{end}}
</ul>
</div>
</nav>
{{end}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment