Go to page content

default

Replaces empty and undefined values with the argument.

For example:

{{ value|default:"that was empty" }}

When the value is the “” then the output “that was empty”.

See also the filter default_if_none.

This page is part of the Zotonic documentation, which is licensed under the Apache License 2.0.