{{- $parent := .parent -}} {{- $level := .level -}} {{- $options := .options -}} {{- $level_options := index $options (printf "level_%d" $level) -}} {{- $slug := anchorize .parent.title -}} {{ $class := "dropdown-menu" }} {{ if $level_options.title.active }} {{ $class = printf "%s is-titled" $class }} {{ end }}
{{- with $level_options.title }} {{ if .active }}
{{ .submenu }}
{{ end -}} {{ else -}} {{ .submenu }} {{ end }}