Permalink
Browse files

Add ability to use submenu items

  • Loading branch information...
cfrome77 committed May 26, 2018
1 parent 47fc89d commit 7e35b852982d114059face1f2890aa79f6aec7cf
Showing with 15 additions and 4 deletions.
  1. +15 −4 layouts/partials/header.html
@@ -19,10 +19,21 @@
</li>
{{ range .Site.Menus.header }}
{{ $name := lower .Name }}
<li >
<a href="{{ .URL }}">~/{{ lower .Name }}</a>
</li>
{{end}}
<li class="dropdown">
{{ if .HasChildren }}
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ .Name }} <span class="caret"></span></a>
<ul class="dropdown-menu">
{{ range .Children }}
<li>
<a href="{{ .URL }}">~/{{ lower .Name }}</a>
</li>
{{ end }}
</ul>
{{ else }}
<a href="{{ .URL }}">~/{{ lower .Name }}</a>
{{ end }}
</li>
{{ end }}
</ul>
</div><!-- /.navbar-collapse -->

0 comments on commit 7e35b85

Please sign in to comment.