{{$currentNode := .}}
{{define "menu"}}
{{- $currentNode := .currentnode -}}
{{ with .sect }}
{{ if in .Site.Params.menu_exclusion .Section }}
{{- else -}}
{{- safeHTML .Params.head -}}
{{ .Title }}
{{- $numberOfPages := (add (len .Pages) (len .Sections)) -}}
{{if ne $numberOfPages 0}}
{{end}}
{{- end -}}
{{- else -}}
{{- if not .Params.Hidden -}}
{{ .Title }}
{{- end -}}
{{ end -}}
{{ end }}