diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2024-12-11 09:53:33 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2024-12-11 09:53:33 +0100 |
commit | b47376586a50753c2ee1f02961d0b0c2280bbc9c (patch) | |
tree | 0b12e4ebdbd20570e6da9dd5ba36694a1377f2ff /docs/content/en/methods/shortcode/Store.md | |
parent | 5ab38de36387062a8ca6c1d18c6a773fa248519c (diff) | |
parent | e477373487abcccdbed95688e37aa74b9b8fc198 (diff) | |
download | hugo-b47376586a50753c2ee1f02961d0b0c2280bbc9c.tar.gz hugo-b47376586a50753c2ee1f02961d0b0c2280bbc9c.zip |
Merge commit 'e477373487abcccdbed95688e37aa74b9b8fc198'
Diffstat (limited to 'docs/content/en/methods/shortcode/Store.md')
-rw-r--r-- | docs/content/en/methods/shortcode/Store.md | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/docs/content/en/methods/shortcode/Store.md b/docs/content/en/methods/shortcode/Store.md new file mode 100644 index 000000000..f7be8c8d0 --- /dev/null +++ b/docs/content/en/methods/shortcode/Store.md @@ -0,0 +1,29 @@ +--- +title: Store +description: Returns a "Store pad" scoped to the shortcode to store and manipulate data. +categories: [] +keywords: [] +action: + related: + - functions/collections/NewScratch + - methods/page/Store + - methods/site/Store + - functions/hugo/Store + returnType: maps.Store + signatures: [SHORTCODE.Store] +--- + +{{< new-in 0.139.0 >}} + +The `Store` method within a shortcode creates a [scratch pad] to store and manipulate data. The scratch pad is scoped to the shortcode. + +{{% note %}} +With the introduction of the [`newScratch`] function, and the ability to [assign values to template variables] after initialization, the `Store` method within a shortcode is mostly obsolete. + +[assign values to template variables]: https://go.dev/doc/go1.11#text/template +[`newScratch`]: /functions/collections/newScratch/ +{{% /note %}} + +[Store pad]: /getting-started/glossary/#scratch-pad + +{{% include "methods/page/_common/scratch-methods.md" %}} |