Assign template context to var

This commit is contained in:
Will Faught
2023-01-29 10:56:57 -08:00
parent 548af63634
commit 64e148ab6f
32 changed files with 262 additions and 199 deletions

View File

@@ -1,3 +1,5 @@
{{ $page := . }}
{{ $first := templates.Exists "partials/paige/header-first.html" }}
{{ $last := templates.Exists "partials/paige/header-last.html" }}
{{ $menu := site.Menus.main }}
@@ -5,13 +7,13 @@
{{ if or $first $last $menu }}
<header>
{{ if $first }}
{{ partial "paige/header-first.html" . }}
{{ partial "paige/header-first.html" $page }}
{{ end }}
{{ if $menu }}
{{ partial "paige/menu.html" . }}
{{ partial "paige/menu.html" $page }}
{{ end }}
{{ if $last }}
{{ partial "paige/header-last.html" . }}
{{ partial "paige/header-last.html" $page }}
{{ end }}
</header>
{{ end }}