Add condition around header

This commit is contained in:
Will Faught
2023-03-24 22:01:39 -07:00
parent a02a441bb5
commit 4a6374f460

View File

@@ -1,14 +1,16 @@
{{ $page := . }}
<header id="paige-header">
{{ if templates.Exists "partials/paige/header-first.html" }}
{{ partial "paige/header-first.html" $page }}
{{ end }}
{{ if or $page.Ancestors site.Menus.main }}
<header id="paige-header">
{{ if templates.Exists "partials/paige/header-first.html" }}
{{ partial "paige/header-first.html" $page }}
{{ end }}
{{ partial "paige/menu.html" $page }}
{{ partial "paige/breadcrumbs.html" . }}
{{ partial "paige/menu.html" $page }}
{{ partial "paige/breadcrumbs.html" . }}
{{ if templates.Exists "partials/paige/header-last.html" }}
{{ partial "paige/header-last.html" $page }}
{{ end }}
</header>
{{ if templates.Exists "partials/paige/header-last.html" }}
{{ partial "paige/header-last.html" $page }}
{{ end }}
</header>
{{ end }}