1
Fork 0

Allow hiding items from nav

This commit is contained in:
Jake Howard 2017-05-08 20:53:49 +01:00
parent c66e798f27
commit 5685081b77
2 changed files with 2 additions and 2 deletions

View file

@ -10,7 +10,7 @@
</div> </div>
{{ end }} {{ end }}
<div class="row"> <div class="row">
{{ range .Pages.ByTitle }} {{ range where .Pages.ByTitle "Params.show_in_nav" "!=" "false" }}
{{ partial "box.html" . }} {{ partial "box.html" . }}
{{ end }} {{ end }}
</div> </div>

View file

@ -7,7 +7,7 @@
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a> <a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
{{ if .Pages }} {{ if .Pages }}
<ul> <ul>
{{ range first .Site.Params.nav_items .Pages.ByDate }} {{ range first .Site.Params.nav_items (where .Pages.ByDate "Params.show_in_nav" "!=" "false") }}
<li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li> <li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
{{ end }} {{ end }}
{{ if ge (len .Pages) .Site.Params.nav_items }} {{ if ge (len .Pages) .Site.Params.nav_items }}