mirror of
https://github.com/ISEAL-Community/iseal-core.git
synced 2025-05-13 08:27:50 +02:00
site/layouts: add cluster to partialCached key
When we cache the output of partials we get duplicate elements be- cause both ISEAL and FSC have "Scope", "Certificate", etc modules. We need to use the cluster as an extra key for the partial cache so these don't overlap. See: https://gohugo.io/functions/partialcached/
This commit is contained in:
@ -33,12 +33,13 @@
|
||||
{{/* it in the range below. */}}
|
||||
{{ $context := . }}
|
||||
|
||||
{{ .Scratch.Set "cluster" "Fsc" }}
|
||||
{{ $cluster := "Fsc" }}
|
||||
{{ .Scratch.Set "cluster" $cluster }}
|
||||
{{ $modules := slice "Assurance" "Certificate" "Coverage" "Evaluation" "Form" "Scope" "Status" }}
|
||||
{{ range $modules }}
|
||||
{{ $module := . }}
|
||||
{{ $.Scratch.Set "module" $module }}
|
||||
{{ partialCached "module-elements.html" $context $module }}
|
||||
{{ partialCached "module-elements.html" $context $cluster $module }}
|
||||
{{ end }}
|
||||
|
||||
<h2 id="download">Download</h2>
|
||||
|
Reference in New Issue
Block a user