- {{ $parent := .Page }}
- {{ $pages := (where .Site.Pages "Section" .Section).ByWeight }}
+ {{ $parent := .Page -}}
+ {{ $pages := (where .Site.Pages "Section" .Section).ByWeight -}}
{{ $pages = (where $pages "Type" "!=" "search") }}
- {{ $pages = (where $pages ".Params.hide_summary" "!=" true) }}
- {{ $pages = (where $pages ".Parent" "!=" nil) }}
- {{ $pages = (where $pages "Parent.File.UniqueID" "==" $parent.File.UniqueID) }}
- {{ if or $parent.Params.no_list (eq (len $pages) 0) }}
+ {{ $pages = (where $pages ".Params.hide_summary" "!=" true) -}}
+ {{ $pages = (where $pages ".Parent" "!=" nil) -}}
+ {{ if .Parent.File -}}
+ {{ $pages = (where $pages "Parent.File.UniqueID" "==" $parent.File.UniqueID) -}}
+ {{ end -}}
+ {{ if or $parent.Params.no_list (eq (len $pages) 0) -}}
{{/* If no_list is true or we don't have subpages we don't show a list of subpages */}}
- {{ else if $parent.Params.simple_list }}
+ {{ else if $parent.Params.simple_list -}}
{{/* If simple_list is true we show a bulleted list of subpages */}}
- {{ else }}
+ {{ else -}}
{{/* Otherwise we show a nice formatted list of subpages with page descriptions */}}
- {{ range $pages }}
- {{ $manualLink := cond (isset .Params "manuallink") .Params.manualLink ( cond (isset .Params "manuallinkrelref") (relref . .Params.manualLinkRelref) .RelPermalink) }}
+ {{ range $pages -}}
+ {{ $manualLink := cond (isset .Params "manuallink") .Params.manualLink ( cond (isset .Params "manuallinkrelref") (relref . .Params.manualLinkRelref) .RelPermalink) -}}
-
{{ .Description | markdownify }}
+
{{ .Description | markdownify -}}