- {{ range index $currentNode.Params (printf "has_%s" (index ($graphOptions.Get "has") 1) )}}
- {{ with $.GetPage (printf "%s%s" (printf "/%s/" (index ($graphOptions.Get "has") 0)) . ) }}
-
+ {{ range index $currentNode.Params (printf "has_%s" (index ($.Scratch.Get "has") 1) )}}
+ {{ with $.GetPage (printf "%s%s" (printf "/%s/" (index ($.Scratch.Get "has") 0)) . ) }}
+
{{ end }}
{{ end }}
{{ end }}
- {{ if eq ($graphOptions.Get "depth") "crust" }}
+ {{ if eq ($.Scratch.Get "depth") "crust" }}
- in {{ index ($graphOptions.Get "in") 1 }}⁄
+ in {{ index ($.Scratch.Get "in") 1 }}⁄
- {{ range where $.Site.RegularPages ".Section" (index ($graphOptions.Get "in") 0) }}
- {{ if in (index .Params (printf "has_%s" ($graphOptions.Get "plural"))) $currentNode.File.LogicalName }}
+
+ {{ range where $.Site.RegularPages ".Section" (index ($.Scratch.Get "in") 0) }}
+ {{ if in (index .Params (printf "has_%s" ($.Scratch.Get "plural"))) $currentNode.File.LogicalName }}
diff --git a/themes/sandpoints/layouts/partials/header.html b/themes/sandpoints/layouts/partials/header.html
index 501263a..b40fca1 100644
--- a/themes/sandpoints/layouts/partials/header.html
+++ b/themes/sandpoints/layouts/partials/header.html
@@ -1,44 +1,36 @@
{{ $currentSession := . }}
-{{ $_ := newScratch }}
{{- range $k, $v := .Page.Site.Data.sandpointsnamegraph -}}
{{ if eq $currentSession.File.Dir (printf "%s/" $k) }}
- {{ $_.Add "depth" (index $v "depth") }}
+ {{ $.Scratch.Add "depth" (index $v "depth") }}
{{ if eq (index $v "depth") "mantle" }}
- {{ $_.Add "home" (index $v "in" 0) }}
+ {{ $.Scratch.Add "home" (index $v "in" 0) }}
{{ end }}
{{ if eq (index $v "depth") "crust" }}
- {{ $_.Add "home" (index (index $currentSession.Site.Data.sandpointsnamegraph (index $v "in" 0)) "in" 0) }}
- {{ $_.Add "mantle" (index $v "in" 0) }}
- {{ $_.Add "mantle_has" (index (index $currentSession.Site.Data.sandpointsnamegraph (index $v "in" 0)) "has" 1) }}
+ {{ $.Scratch.Add "home" (index (index $currentSession.Site.Data.sandpointsnamegraph (index $v "in" 0)) "in" 0) }}
+ {{ $.Scratch.Add "mantle" (index $v "in" 0) }}
+ {{ $.Scratch.Add "mantle_has" (index (index $currentSession.Site.Data.sandpointsnamegraph (index $v "in" 0)) "has" 1) }}
{{ end }}
{{ end }}
{{- end -}}
-