diff --git a/layouts/partials/bootstrap/collapse.html b/layouts/partials/bootstrap/collapse.html index 163db36..4db4d6a 100644 --- a/layouts/partials/bootstrap/collapse.html +++ b/layouts/partials/bootstrap/collapse.html @@ -1,4 +1,8 @@ -{{- $id := printf "collapse-%d" now.UnixNano -}} +{{- if not (.Page.Scratch.Get "collapseCounter") -}} + {{- .Page.Scratch.Set "collapseCounter" 0 -}} +{{- end -}} +{{- .Page.Scratch.Add "collapseCounter" 1 -}} +{{- $id := printf "collapse-%d" (.Page.Scratch.Get "collapseCounter") -}} {{- $heading := "" -}} {{- $style := "primary" -}} {{- $expand := false -}}