Back to Yugabyte Db

Sidebar Tree

docs/layouts/_partials/sidebar-tree.html

2026.1.0.0-b251.1 KB
Original Source

{{ $currentPage := .context }} {{ $menuName := .context.Scratch.Get "leftNavName" }} {{ $pageUrl := .context.Page.RelPermalink }} {{ $productsMenu := .context.Site.Menus.products }} {{ $versionDir := .context.Scratch.Get "docVersion" }} {{ if not (isset .context.Site.Menus $menuName) }} {{ $menuName = .context.Scratch.Get "docVersion" }} {{ end }}

Docs Menu

{{- define "left-nav-tree-section" -}} {{ $currentMenu := .currentMenu }} {{ $currentPage := .currentPage }} {{ $menuName := .menuName }} {{ $newList := .newList }} {{ $parentIdentifier := .parentIdentifier }} {{- if $newList -}} {{- end -}} {{- range $index, $item := $currentMenu.Children -}} {{- if not .Params.hide -}} {{- if le (len (where (first (add $index 1) $currentMenu.Children) "Name" .Name)) 1 -}} - {{- .Name -}} {{- if .HasChildren -}} {{ $parentIdentifier := printf "%s" .Identifier }} {{- template "left-nav-tree-section" (dict "currentMenu" . "currentPage" $currentPage "menuName" $menuName "newList" true "parentIdentifier" $parentIdentifier ) -}} {{- end -}} {{- end -}} {{- end -}} {{- end -}} {{- if $newList -}} {{- end -}} {{- end }}