diff --git a/modules/blox/blox/team-showcase/block.html b/modules/blox/blox/team-showcase/block.html index 2dbee566..07e04b3f 100644 --- a/modules/blox/blox/team-showcase/block.html +++ b/modules/blox/blox/team-showcase/block.html @@ -70,7 +70,7 @@ {{ $groups := $block.content.user_groups }} {{ if $groups }} - {{ range $groupItem := $groups }} + {{ range $i, $groupItem := $groups }} {{ $groupName := "" }} {{ $groupSortField := $sort_field }} {{ $groupSortAsc := $sort_asc }} @@ -124,15 +124,17 @@ {{ end }} {{ $groupProfiles = sort $groupProfiles "sort_val" $groupOrder }} - {{ if and (or (gt (len $groupProfiles) 0) $show_empty_groups) (gt (len $groups) 1) }} -
+ {{ $hasGroupContent := or (gt (len $groupProfiles) 0) $show_empty_groups }} + + {{ if and $hasGroupContent (gt (len $groups) 1) }} +

{{ $groupName | markdownify }}

{{ end }} - {{ if or (gt (len $groupProfiles) 0) $show_empty_groups }} + {{ if $hasGroupContent }}
{{ if eq (len $groupProfiles) 0 }} {{ if $show_empty_groups }}