# default\_if\_undefined

Source: https://zotonic.com/docs/2491/default_if_undefined

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

Language: en



Provide an alternative value in case a value is undefined.

For example:

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

Same as <a href="/id/doc_template_filter_filter_default_if_none" class="doc-reference doc-reference-filter"><code>filter#default_if_none</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/2491?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/2491?language=en>)
