doc: clarify Scratch usage in shortcodes
authorbep <bjorn.erik.pedersen@gmail.com>
Sun, 19 Apr 2015 09:30:10 +0000 (11:30 +0200)
committerbep <bjorn.erik.pedersen@gmail.com>
Sun, 19 Apr 2015 09:30:11 +0000 (11:30 +0200)
docs/content/extras/scratch.md

index e3c1d9f40152288829827fffd2615b4d12a8e14c..de591caaec28666c9befc6477b04e8f93ea9a9c0 100644 (file)
@@ -40,5 +40,6 @@ The usage is best illustrated with some samples:
 ```
 
 **Note:** The examples above uses the special `$` variable, which refers to the top-level node. This is the behavior you most likely want, and will help remove some confusion when using `Scratch` inside page range loops -- and you start inadvertently calling the wrong `Scratch`. But there may be use cases for `{{ .Scratch.Add "key" "some value" }}`.
+**Note:** To use `Scratch` in a `shortcode`, you will have to use the shortcode's Page's `Scratch`:  `{{ .Page.Scratch.Add "a1" 12 }}` or `{{ $.Page.Scratch.Add "a1" 12 }}`.