summaryrefslogtreecommitdiff
path: root/docs/templates.md
diff options
context:
space:
mode:
authorpraschke <stel@comfy.monster>2023-10-17 22:11:29 +0100
committerpraschke <stel@comfy.monster>2023-10-17 22:12:32 +0100
commit9f8269606fdf51765f6d13de4caac709691b0fea (patch)
tree2a32d140690ea2868b0df3ec47533601ebe29ce1 /docs/templates.md
parent68ff30006edcd0dca44326780d34a6ca39f65157 (diff)
update: set and get
Diffstat (limited to 'docs/templates.md')
-rw-r--r--docs/templates.md20
1 files changed, 10 insertions, 10 deletions
diff --git a/docs/templates.md b/docs/templates.md
index e0ea0861..e19309a7 100644
--- a/docs/templates.md
+++ b/docs/templates.md
@@ -351,7 +351,7 @@ Gets a value from the custom state stack.
<details>
<summary>Syntax:</summary>
- <code>{{#get <i>name</i>}}{{/get}}</code>
+ <code>{{get <i>name</i>}}</code>
* _`name`_ <br>
The name of the variable to get.
@@ -360,7 +360,7 @@ Gets a value from the custom state stack.
<summary>Example:</summary>
```handlebars
- {{#get "some-text"}}{{/get}}
+ {{get "some-text"}}
```
Output:
@@ -378,7 +378,7 @@ Assigns a value to the custom state stack.
<summary>Syntax:</summary>
<code>{{#set <i>name</i>}}<i>value</i>{{/get}}</code><br>
- <code>{{#set <i>name</i> <i>value</i>}}{{/get}}</code><br>
+ <code>{{set <i>name</i> <i>value</i>}}</code><br>
* _`name`_ <br>
The name of the variable to assign.
@@ -390,7 +390,7 @@ Assigns a value to the custom state stack.
```handlebars
{{#set "some-text"}}This is the value of some-text!{{/set~}}
- {{~#set "some-number" 32}}{{/set}}
+ {{~set "some-number" 32}}
```
Output:
@@ -419,14 +419,14 @@ and variable lookups will start from the most recent scope and work backwards un
<summary>Example:</summary>
```handlebars
- {{~#set "key" 32}}{{/set~}}
- {{~#get "key"}}{{/get~}},
+ {{~set "key" 32~}}
+ {{~get "key"~}},
{{~#scope~}}
- {{~#get "key"}}{{/get~}},
- {{~#set "key" 64}}{{/set~}}
- {{~#get "key"}}{{/get~}},
+ {{~#get "key"~}},
+ {{~#set "key" 64~}}
+ {{~#get "key"~}},
{{~/scope~}}
- {{~#get "key"}}{{/get~}}
+ {{~get "key"~}}
```
Output: