mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-08 08:14:36 -04:00
Update Include.md - improve return statement example
This commit is contained in:
parent
0371510730
commit
4d6d7018b9
@ -68,7 +68,7 @@ Then, within the partial template:
|
||||
To return a value from a partial template, it must contain only one `return` statement, placed at the end of the template:
|
||||
|
||||
```go-html-template
|
||||
{{ $result := false }}
|
||||
{{ $result := "" }}
|
||||
{{ if math.ModBool . 2 }}
|
||||
{{ $result = "even" }}
|
||||
{{ else }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user