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>
{{ end }}
<div class="row">
{{ range .Pages.ByTitle }}
{{ range where .Pages.ByTitle "Params.show_in_nav" "!=" "false" }}
{{ partial "box.html" . }}
{{ end }}
</div>

View file

@ -7,7 +7,7 @@
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
{{ if .Pages }}
<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>
{{ end }}
{{ if ge (len .Pages) .Site.Params.nav_items }}