Skip to main content

$(default)

$(default '[value]' [fallback])

Displays the value inside the quotes — unless it is empty, in which case the fallback text is displayed instead.

The value must be wrapped in quotes: that keeps the function parseable when a variable resolves to nothing.

Examples

$(default '{{stream_title}}' No title set)

Will display the stream title, or "No title set" while it's empty

$(default '{{goal_text}}' Working towards the next goal!)

Will display the goal text with a friendly fallback