2.7.9. Default

Default shows the block value or the default value, if this block is not set.

Table 2.8. Default: parameters

Default: parameters
NameTypeRequired?Description
testExpressionYesThe block we want to show.
altExpressionNoThe alternative value, if the first block doesn't exist.

Example 2.55. Default values

<p>{default=$price; "No such price"}</p>

The example will show the text "No such price", if the block $price is not created by the script, or its value, if it is.