hugo/docs/content/en/methods/shortcode/Scratch.md
Bjørn Erik Pedersen 5fd1e74903
Merge commit '9b0050e9aabe4be65c78ccf292a348f309d50ccd' as 'docs'
```
git subtree add --prefix=docs/ https://github.com/gohugoio/hugoDocs.git master --squash
```

Closes #11925
2024-01-27 10:48:57 +01:00

891 B

title description categories keywords action
Scratch Creates a "scratch pad" scoped to the shortcode to store and manipulate data.
related returnType signatures
functions/collections/NewScratch
maps.Scratch
SHORTCODE.Scratch

The Scratch method within a shortcode creates a scratch pad to store and manipulate data. The scratch pad is scoped to the shortcode, and is reset on server rebuilds.

{{% note %}} With the introduction of the newScratch function, and the ability to assign values to template variables after initialization, the Scratch method within a shortcode is obsolete.

{{% /note %}}

{{% include "methods/page/_common/scratch-methods.md" %}}