How to make an empty variable show a default text

Use “?text” after the var:key

Like this:

$var:surname?(Name is missing)$

If the variable surname does not contain any data, the text (Name missing) will be displayed.

To use with other formatting options:
$var:date:yyyy-mm-dd?(Date is missing)$