diff --git a/layouts/partials/sidebar/sections.html b/layouts/partials/sidebar/sections.html index 0e4b2b9771..e834404420 100644 --- a/layouts/partials/sidebar/sections.html +++ b/layouts/partials/sidebar/sections.html @@ -79,6 +79,9 @@ {{- end }} + {{/* Only show expand group button if section has children */}} + {{- $hasChildren := gt (len (where .Pages "Params.sitemap" "ne" "false")) 0 }} + {{- if $hasChildren }} + {{- end }}