Allow hiding from navbar and list
This commit is contained in:
parent
d4bafe86ed
commit
8b459b18d3
2 changed files with 2 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{ $parent := . }}
|
{{ $parent := . }}
|
||||||
{{ $valid_pages := where .Site.Pages.ByTitle ".Parent" "!=" nil }}
|
{{ $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 }}
|
{{ range where $valid_pages ".Parent.UniqueID" $parent.UniqueID }}
|
||||||
{{ if $parent.Params.show_images }}
|
{{ if $parent.Params.show_images }}
|
||||||
{{ partial "box_image.html" . }}
|
{{ partial "box_image.html" . }}
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
{{ if eq .Parent $home }}
|
{{ if eq .Parent $home }}
|
||||||
{{ $valid_children := where .Site.Pages.ByTitle ".Parent" "!=" nil }}
|
{{ $valid_children := where .Site.Pages.ByTitle ".Parent" "!=" nil }}
|
||||||
{{ $children := where $valid_children ".Parent.UniqueID" .UniqueID }}
|
{{ $children := where $valid_children ".Parent.UniqueID" .UniqueID }}
|
||||||
|
{{ $children := where $children ".Params.hide_in_nav" "!=" "true" }}
|
||||||
<li class="top-level">
|
<li class="top-level">
|
||||||
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
||||||
{{ if $children }}
|
{{ if $children }}
|
||||||
|
|
Loading…
Reference in a new issue