# insert\_bottom

Source: https://zotonic.com/docs/1333/insert_bottom

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

Language: en



Inserts HTML after the contents of an HTML element.

Adds a template or a literal HTML text after the existing content.

Example:

```django
<div id="mydiv"><p>Bye Bye.</p></div>
{% button text="hello" action={insert_bottom target="mydiv" text="<p>Hello World!</p>"} %}
```

After the button is clicked, the contents of the div will be &lt;p>Bye Bye.&lt;/p>&lt;p>Hello World!&lt;/p>.

Another example, now rendering a template:

```django
<ul id="mylist"><li>Some item</li></li>
{% button text="hello" action={insert_bottom target="mylist" template="_list_item.tpl" id=42} %}
```

This inserts the output of the template `_list_item.tpl` below the existing `<li>`. All arguments to the update action are also arguments to the template.

License: 

Attribution: 

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