{{ $sideMargin := "50px" }} {{ $verticalMargin := "30px" }} {{ $fontSize:= "12pt" }} {{ $currentPage := . }} {{ $curWeight := -1 }} {{ range .Site.Menus.docs }} {{ if .HasChildren }} {{ $extractParent := $currentPage.Parent.Page }} {{ $currentParent := (replaceRE "Page\\(\\/(.*)\\)" "$1" $extractParent) }} {{ range .Children }} {{ if eq $currentParent (.Parent) }} {{ if .Weight }} {{ if $currentPage.IsMenuCurrent "docs" . }}
Previous - Page
Next - Page
{{ end }} {{ else }} {{ if $currentPage.IsMenuCurrent "docs" . }}
{{ with $currentPage.NextInSection }} Previous - {{ .Name }} {{ end }}
{{ with $currentPage.PrevInSection }} Next - {{ .Name }} {{ end }}
{{ end }} {{ end }} {{ end }} {{ end }} {{ else }} {{ $extractParent := $currentPage.Parent.Page }} {{ $currentParent := (replaceRE "Page\\(\\/(.*)\\)" "$1" $extractParent) }} {{ if eq $currentParent (.Parent) }} {{ if .Weight }} {{ if $currentPage.IsMenuCurrent "docs" . }}
Previous - Page
Next - Page
{{ end }} {{ else }} {{ if $currentPage.IsMenuCurrent "docs" . }}
{{ with $currentPage.NextInSection }} Previous - {{ .Name }} {{ end }}
{{ with $currentPage.PrevInSection }} Next - {{ .Name }} {{ end }}
{{ end }} {{ end }} {{ end }} {{ end }} {{ end }}