Updates the content of an iframe with a template or a literal HTML text.


<iframe id="preview"></iframe>
{% button text="Show Email" action={update_iframe target="preview" template="email.tpl" recipient_id=m.acl.user} %}

When clicked, the contents of the iframe will be set to the rendered email.tpl template. This replaces any content present.

Argument Description Example
target The id of the iframe receiving the rendered HTML document. target=”my-view”
text Literal HTML doc to be inserted, no escaping will be done. text=”<html>…</html>”
template Name of the template to be rendered. template=”page.tpl”
catinclude Add this argument to use a catinclude instead of a normal include of the template. The id argument must be present for a catinclude to work. catinclude id=1

All other arguments are passed as-is to the included template(s).

Edit on GitHub