mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 20:17:17 +00:00
Update shortcode-templates.md
Improved based on a little confusion on forum related to how to access e.g. a second positional param.
This commit is contained in:
1 parent
1f2846e6d1
commit
c6b193c6f3
1 file changed
+6
@@ -71,6 +71,12 @@ To access a parameter by position, use the `.Get` followed by a numeric position
|
|||||||
{{ .Get 0 }}
|
{{ .Get 0 }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For the second position, you would just use:
|
||||||
|
|
||||||
|
```
|
||||||
|
{{ .Get 1 }}
|
||||||
|
```
|
||||||
|
|
||||||
`with` is great when the output depends on a parameter being set:
|
`with` is great when the output depends on a parameter being set:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in new issue
Block a user