{{ define "render-menu" }} {{ $root := .root }} {{ $ctx := .ctx }} {{ $depth := .depth }} {{ $currentURL := $root.Permalink }} {{ $sectionName1 := index (last 1 (split (delimit (split $ctx.Permalink "/") "," "") ",")) 0 }} {{ $sectionName2 := index (last 2 (split (delimit (split $currentURL "/") "," "") ",")) 0 }} {{ $active := in $currentURL $ctx.Permalink }} {{ $active = or $active (eq $sectionName1 $sectionName2) }} {{ $active = or $active (in $currentURL $sectionName1) }} {{ if $ctx.Params.Collapsible }} {{ $ctx.Title }} {{ if eq ($root.Param "languagedir") "rtl" }} {{ partial "svgs/arrow-left.svg" (dict "width" 22 "height" 22) }} {{ else }} {{ partial "svgs/arrow-right.svg" (dict "width" 22 "height" 22) }} {{ end }} {{ else }} {{ $lastUrlElement1 := index (last 1 (split (delimit (split $ctx.Permalink "/") "," "") ",")) 0 }} {{ $lastUrlElement2 := index (last 1 (split (delimit (split $currentURL "/") "," "") ",")) 0 }}
  • {{ $ctx.Title }}
  • {{ end }} {{ end }}