mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 12:14:49 +00:00
1 parent
5f923768a6
commit
f17e67b4b5
1 file changed
+6
@@ -21,6 +21,12 @@ aliases: []
|
||||
|
||||
`dict` is especially useful for passing more than one value to a partial template.
|
||||
|
||||
Note that the `key` can be either a `string` or a `string slice`. The latter is useful to create a deply nested structure, e.g.:
|
||||
|
||||
```go-text-template
|
||||
{{ $m := dict (slice "a" "b" "c") "value" }}
|
||||
```
|
||||
|
||||
|
||||
## Example: Using `dict` to pass multiple values to a `partial`
|
||||
|
||||
|
||||
Reference in new issue
Block a user