{{- /* Render the main menu. Use submenu_mode to override the configured mode for this call. Classes and mode default to the page's navigation settings. Optional id identifies the list and prefixes its submenu control IDs. Without id, each call gets a unique ID within the current page. In toplevel mode, child lists and submenu controls are omitted. All other modes keep child links reachable without JavaScript. */ -}} {{- $page := .page -}} {{- $classes := .classes | compare.Default (partials.Include "func/header/GetNavigationClasses.html" $page) -}} {{- $mode := partials.Include "func/header/GetSubmenuMode.html" . -}} {{- if $page.Site.Menus.main -}} {{- $page.Store.Add "ananke.navigation.menu-count" 1 -}} {{- $instance := $page.Store.Get "ananke.navigation.menu-count" -}} {{- $id := .id | compare.Default (printf "ananke-menu-%d" $instance) -}} {{- $prefix := printf "%s-submenu" $id -}} {{- if and (eq $instance 1) (not .id) -}} {{- $id = "ananke-menu" -}} {{- $prefix = "ananke-submenu" -}} {{- end -}}
{{- end -}}