From 2275ef2e9394541f2530f70058656177d35c85f2 Mon Sep 17 00:00:00 2001 From: Daniel Wagner-Hall Date: Fri, 8 Nov 2024 11:37:16 +0000 Subject: [PATCH] Introduce indirection in partial --- common-theme/layouts/partials/map-common.html | 0 common-theme/layouts/partials/map.html | 30 +------------------ 2 files changed, 1 insertion(+), 29 deletions(-) create mode 100644 common-theme/layouts/partials/map-common.html diff --git a/common-theme/layouts/partials/map-common.html b/common-theme/layouts/partials/map-common.html new file mode 100644 index 000000000..e69de29bb diff --git a/common-theme/layouts/partials/map.html b/common-theme/layouts/partials/map.html index 004835227..29a9e12af 100644 --- a/common-theme/layouts/partials/map.html +++ b/common-theme/layouts/partials/map.html @@ -1,29 +1 @@ -{{ with .Params.map }} -
-

👉🏾

- {{ range $i, $currentMapSectionName := . }} - {{ $currentMapSectionModules := index site.Menus $currentMapSectionName }} -
-

- 📍{{ $i }}: - {{ $currentMapSectionName }} -

-
    - {{/* Check if a menu for the current map section exists */}} - {{ if $currentMapSectionModules }} - {{/* Range over the items in the menu */}} - {{ range $iterator, $module := $currentMapSectionModules }} -
  1. - {{ partial "card.html" $module }} -
  2. - {{ end }} - {{ else }} -
  3. No items found for {{ $currentMapSectionName }}
  4. - {{ end }} -
-
- {{ end }} -
-{{ end }} +{{ partial "map-common.html" . }}