From d978c98955de13adf305ea77f6b62589d9332b6f Mon Sep 17 00:00:00 2001 From: Alexis BENOIT <alex@noesya.coop> Date: Tue, 17 Dec 2024 18:48:05 +0100 Subject: [PATCH] hotifx: menu dropdown condition --- layouts/partials/commons/menu-dropdown.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/layouts/partials/commons/menu-dropdown.html b/layouts/partials/commons/menu-dropdown.html index 42847b7c..22bc0311 100644 --- a/layouts/partials/commons/menu-dropdown.html +++ b/layouts/partials/commons/menu-dropdown.html @@ -3,7 +3,8 @@ {{- $options := .options -}} {{- $level_options := index $options (printf "level_%d" $level) -}} {{- $slug := anchorize .parent.title -}} -{{ $class := "dropdown-menu" }} +{{- $submenu := .submenu -}} +{{- $class := "dropdown-menu" -}} {{ if $level_options.title.active }} {{ $class = printf "%s is-titled" $class }} @@ -27,10 +28,10 @@ {{ end }} </div> - {{ .submenu }} + {{ $submenu }} </div> + {{ else -}} + {{ $submenu }} {{ end -}} - {{ else -}} - {{ .submenu }} {{ end }} </div> -- GitLab