mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 18:15:45 +00:00
Partial: Update variable name in example
This commit is contained in:
1 parent
7d7b1f03c1
commit
7b207a404d
1 file changed
+4
-4
@@ -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
|
||||
|
||||
Reference in new issue
Block a user