default
x | default(value=, boolean=?)value when the input is undefined (only then; boolean=true also replaces falsy values). Not Go’s default.
Arguments#
| Argument | Type | Required |
|---|---|---|
value | any | yes |
boolean | bool | no |
Details#
- Kind: Filter, implemented by a Tera built-in.
- Available in: every kind of template: layouts, partials, shortcodes and render hooks.
- Output: escaped like any value, unless marked
safe.