mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-12 06:19:23 -04: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:
parent
1f2846e6d1
commit
c6b193c6f3
@ -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:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user