> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arc.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# arc:render

> Use arc:render to evaluate and render templates, either from a file or an in-memory template string.

Use the `arc:render` keyword to render templates.

## Parameters

* **template**: The .rst file to evaluate.
* **templateData**: The in-memory template to evaluate.
* **in\[put]**: A comma-separated list of items to pass into the template.
* **out\[put]**: The resulting item or feed.
* **to**: The attribute to push the result into.
  \[!NOTE] You can also save the result by wrapping the `arc:render` statement with a multi-line [arc:set](https://docs.arc.cdata.com/26.4/self-hosted/en/scripting/keyword-reference/op-arc-set.md).
* **onerror**: The action to perform when an error is encountered in a template. Set this to `clear` to call and render a template only if there is no exception.

## Control Attributes

None

## Examples

Catch an exception so the main template can render the rest of the content:

```xml theme={null}
<table border="1">
  <tr>
  <td>
    <arc:render template="error.rst">
      <arc:catch code="*">
        <a name="caught">
        A problem was encountered with the template
        </a>
      </arc:catch>
    </arc:render>
    <!-- Ensure that tags are closed -->
  </td>
  </tr>
</table>
```

Render an in-memory template:

```xml theme={null}
<arc:setc attr="a.t" value="this is [name]."/>
<arc:set attr="i.name" value="a test" />
<arc:set item="r" />
<arc:render templateData="[a.t]" in="i" to="r.text" />
[r.text]
```

## See Also

* [arc:catch](https://docs.arc.cdata.com/26.4/self-hosted/en/scripting/keyword-reference/op-arc-catch.md): Handle exceptions in ArcScript.
* [arc:finally](https://docs.arc.cdata.com/26.4/self-hosted/en/scripting/keyword-reference/op-arc-finally.md): Ensure that formatting is completed.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.