# use

Source: https://zotonic.com/docs/2507/use

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

Language: en



::: {.aside}
See also

<a href="/id/doc_template_tag_tag_fragment" class="doc-reference doc-reference-tag"><code>tag#fragment</code></a> and <a href="/id/doc_template_tag_tag_useblock" class="doc-reference doc-reference-tag"><code>tag#useblock</code></a>.
:::

Render a named fragment defined with <a href="/id/doc_template_tag_tag_fragment" class="doc-reference doc-reference-tag"><code>tag#fragment</code></a>.

The `use` tag renders a fragment that was defined with the <a href="/id/doc_template_tag_tag_fragment" class="doc-reference doc-reference-tag"><code>tag#fragment</code></a> tag.

Example:

```django
{% fragment answer_row %}
    <div class="row">
        <label>{{ label }}</label>
        <span>{{ value }}</span>
    </div>
{% endfragment %}

{% use answer_row label="Email" value=user.email %}
```

::: {.note title="Note"}
Like the <a href="/id/doc_template_tag_tag_include" class="doc-reference doc-reference-tag"><code>tag#include</code></a> tag, the `with` keyword is optional:

```django
{% use answer_row label="Email" value=user.email %}
{% use answer_row with label="Phone" value=user.phone %}
```
:::

The fragment is rendered with the current template context, extended with the supplied arguments.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2507?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/2507?language=en>)
