mirror of
https://github.com/idanoo/m2.nz.git
synced 2024-11-23 00:35:12 +00:00
9 lines
330 B
HTML
9 lines
330 B
HTML
|
{{- /* ID */ -}}
|
||
|
{{- $count := (.Scratch.Get "this").count | default 1 -}}
|
||
|
{{- $id := printf "id-%d" $count -}}
|
||
|
{{- $count | add 1 | .Scratch.SetInMap "this" "count" -}}
|
||
|
{{- with .Content -}}
|
||
|
{{- dict $id . | dict "data" | dict "config" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}}
|
||
|
{{- end -}}
|
||
|
{{- return $id -}}
|