# template

Source: https://zotonic.com/docs/1917/template

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

Language: en



Render a template. When used in a postback action, the result will be sent back with the response data for the postback.

This is useful when you want to send the output from a template back as response in a postback or submit event handler.

Example:

```erlang
z_render:wire({template, [{template, "my_response.tpl"}, {data,
Response}]}, Context).
```

Template accepts the following arguments:

| Argument | Description                                                           | Example                      |
| -------- | --------------------------------------------------------------------- | ---------------------------- |
| template | Name of template to render.                                           | `template="my_template.tpl"` |
| \*       | Any other arguments will be passed on to the template being rendered. | id=123                       |

License: 

Attribution: 

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