{{ $section := .Page.CurrentSection }} {{ if .Get "path" }} {{ $path := .Get "path" }} {{ with ($.Site.GetPage "section" $path) }} {{ $section = .CurrentSection }} {{ end }} {{ end }}