mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-13 13:16:50 -04:00
Partial: Update variable name in example
This commit is contained in:
parent
7d7b1f03c1
commit
7b207a404d
@ -96,14 +96,14 @@ In addition to outputting markup, partials can be used to return a value of any
|
||||
#### Example GetImage
|
||||
```go-html-template
|
||||
{{/* layouts/partials/GetImage.html */}}
|
||||
{{ $return := false }}
|
||||
{{ $image := false }}
|
||||
{{ with .Params.gallery }}
|
||||
{{ $return = index . 0 }}
|
||||
{{ $image = index . 0 }}
|
||||
{{ end }}
|
||||
{{ with .Params.image }}
|
||||
{{ $return = . }}
|
||||
{{ $image = . }}
|
||||
{{ end }}
|
||||
{{ return $return }}
|
||||
{{ return $image }}
|
||||
```
|
||||
|
||||
```go-html-template
|
||||
|
Loading…
x
Reference in New Issue
Block a user