{{- $showvisitedlinks := .Site.Params.showVisitedLinks }} {{- define "partials/inline/page-tree" }} {{- $currentNode := .currentnode }} {{- $config := .config }} {{- $showvisitedlinks := .showvisitedlinks }}
{{- else }} {{- warnf "WARNING: page '%s' not found for sidebar menu '%s'" ($config.pageRef | default "") $config.identifier }} {{- end }} {{- end }} {{- define "partials/inline/page-walker" }} {{- $currentNode := .currentnode }} {{- $showvisitedlinks := .showvisitedlinks }} {{- $alwaysopen := .alwaysopen }} {{- $isSelf := .isSelf }} {{- $isAncestor := .isAncestor }} {{- $isHidden := .isHidden }} {{- with .sect }} {{- $isActive := $isSelf }} {{- $entry := . }} {{- $entries := partialCached "_relearn/pages.gotmpl" (dict "page" .) .Path }} {{- $hasVisibleChildren := false }} {{- range $entries }} {{- $isSubSelf := eq . $currentNode }} {{- $isSubAncestor := and (not $isSubSelf) (.IsAncestor $currentNode) }} {{- $isSubHidden := or (.Params.hidden) (eq .Title "") }} {{- if or $isSubAncestor $isSubSelf (not $isSubHidden) }} {{- $hasVisibleChildren = true }} {{- break }} {{- end }} {{- end }} {{- $title := partial "title.gotmpl" (dict "page" . "linkTitle" true) }} {{- $url := partial "permalink.gotmpl" (dict "to" .) }} {{- $pre := partial "menu-pre.html" . }} {{- $post := partial "menu-post.html" . }} {{- if $hasVisibleChildren }} {{- $isCollapsible := .Params.collapsibleMenu | default site.Params.collapsibleMenu }} {{- $currentAlwaysopen := .Params.alwaysopen | default $alwaysopen }} {{- if and (not $url) (not $isCollapsible) }} {{- $currentAlwaysopen = true }} {{- end }} {{- $entryId := md5 .Path }} {{- $isOpen := or $currentAlwaysopen $isSelf $isAncestor }}