projects
/
GitHub
/
WoltLab
/
woltlab.github.io.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
04a5cea
)
Document the `|json` template modifier
author
Tim Düsterhus
<duesterhus@woltlab.com>
Thu, 20 Jan 2022 11:28:43 +0000
(12:28 +0100)
committer
Tim Düsterhus
<duesterhus@woltlab.com>
Thu, 20 Jan 2022 11:28:43 +0000
(12:28 +0100)
see WoltLab/WCF#4645
docs/view/template-plugins.md
patch
|
blob
|
blame
|
history
diff --git
a/docs/view/template-plugins.md
b/docs/view/template-plugins.md
index aa93714f26a0911af16ec111d781976f5bf817dc..34458520f5c0376987e86d9046d04ef015a8fd13 100644
(file)
--- a/
docs/view/template-plugins.md
+++ b/
docs/view/template-plugins.md
@@
-462,6
+462,17
@@
require(['Language', /* … */], function(Language, /* … */) {
```
+## <span class="label label-info">5.5+</span> `json`
+
+`json` JSON-encodes the given value.
+
+```smarty
+<script>
+let data = { "title": {@$foo->getTitle()|json} };
+</script>
+```
+
+
## `lang`
`lang` replaces a language items with its value.