# default\_if\_none

Source: https://zotonic.com/docs/2490/default_if_none

URI: https://zotonic.com/id/2490

Language: en



Provide an alternative value in case a value is undefined.

For example:

```django
{{ value|default_if_none:1 }}
```

Same as <a href="/id/doc_template_filter_filter_default_if_undefined" class="doc-reference doc-reference-filter"><code>filter#default_if_undefined</code></a>.

This filter is built-in in the template compiler and inlined when compiling templates.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2490?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2490?language=en>)
