1
Fork 0

Allow hiding from navbar and list

This commit is contained in:
Jake Howard 2017-07-14 20:05:47 +01:00
parent d4bafe86ed
commit 8b459b18d3
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 2 additions and 0 deletions

View file

@ -5,6 +5,7 @@
<div class="row">
{{ $parent := . }}
{{ $valid_pages := where .Site.Pages.ByTitle ".Parent" "!=" nil }}
{{ $valid_pages := where $valid_pages ".Params.hide_in_list" "!=" "true" }}
{{ range where $valid_pages ".Parent.UniqueID" $parent.UniqueID }}
{{ if $parent.Params.show_images }}
{{ partial "box_image.html" . }}

View file

@ -7,6 +7,7 @@
{{ if eq .Parent $home }}
{{ $valid_children := where .Site.Pages.ByTitle ".Parent" "!=" nil }}
{{ $children := where $valid_children ".Parent.UniqueID" .UniqueID }}
{{ $children := where $children ".Params.hide_in_nav" "!=" "true" }}
<li class="top-level">
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
{{ if $children }}