{"result":{"depiction_url":null,"edges":{"in_module":{"objects":[{"created":"2020-05-30T05:48:06Z","object_id":{"id":1303,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_wires","title":"mod_wires","uri":"https:\/\/zotonic.com\/id\/1303"},"seq":1000000}],"predicate":{"id":333,"is_a":["meta","predicate"],"name":"in_module","title":{"_type":"trans","tr":{"en":"In module"}},"uri":"https:\/\/zotonic.com\/id\/in_module"}},"references":{"objects":[{"created":"2020-05-30T05:48:06Z","object_id":{"id":1325,"is_a":["text","documentation","reference","template_tag"],"name":"doc_template_tag_tag_catinclude","title":"catinclude","uri":"https:\/\/zotonic.com\/id\/1325"},"seq":1000000}],"predicate":{"id":332,"is_a":["meta","predicate"],"name":"references","title":{"_type":"trans","tr":{"en":"References"}},"uri":"https:\/\/zotonic.com\/id\/references"}},"refers":{"objects":[{"created":"2026-09-09T13:48:18Z","object_id":{"id":1325,"is_a":["text","documentation","reference","template_tag"],"name":"doc_template_tag_tag_catinclude","title":"catinclude","uri":"https:\/\/zotonic.com\/id\/1325"},"seq":1000000},{"created":"2026-09-09T13:48:18Z","object_id":{"id":2041,"is_a":["text","documentation","reference","template_action"],"name":"doc_template_action_action_update_iframe","title":"update_iframe","uri":"https:\/\/zotonic.com\/id\/2041"},"seq":1000000}],"predicate":{"id":2409,"is_a":["meta","predicate"],"name":"refers","title":{"_type":"trans","tr":{"en":"Refers"}},"uri":"https:\/\/zotonic.com\/id\/refers"}},"relation":{"objects":[{"created":"2020-05-30T05:48:06Z","object_id":{"id":2041,"is_a":["text","documentation","reference","template_action"],"name":"doc_template_action_action_update_iframe","title":"update_iframe","uri":"https:\/\/zotonic.com\/id\/2041"},"seq":1000000},{"created":"2020-05-30T05:48:06Z","object_id":{"id":1336,"is_a":["text","documentation","reference","template_action"],"name":"doc_template_action_action_insert_top","title":"insert_top","uri":"https:\/\/zotonic.com\/id\/1336"},"seq":1000000},{"created":"2020-05-30T05:48:06Z","object_id":{"id":1333,"is_a":["text","documentation","reference","template_action"],"name":"doc_template_action_action_insert_bottom","title":"insert_bottom","uri":"https:\/\/zotonic.com\/id\/1333"},"seq":1000000}],"predicate":{"id":303,"is_a":["meta","predicate"],"name":"relation","title":{"_type":"trans","tr":{"nl":"Relatie","en":"Relation"}},"uri":"http:\/\/purl.org\/dc\/terms\/relation"}},"subject":{"objects":[{"created":"2026-09-09T13:48:18Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-09T13:48:18Z","object_id":{"id":2563,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_frontend_developer","title":"Frontend developer","uri":"https:\/\/zotonic.com\/id\/2563"},"seq":2},{"created":"2026-09-09T13:48:18Z","object_id":{"id":2583,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_user_interface_and_interaction","title":"User interface and interaction","uri":"https:\/\/zotonic.com\/id\/2583"},"seq":3},{"created":"2026-09-09T13:48:18Z","object_id":{"id":2620,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_template","title":"Template","uri":"https:\/\/zotonic.com\/id\/2620"},"seq":4},{"created":"2026-09-09T13:48:18Z","object_id":{"id":2624,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_wire_action","title":"Wire action","uri":"https:\/\/zotonic.com\/id\/2624"},"seq":5},{"created":"2026-09-09T13:48:18Z","object_id":{"id":2641,"is_a":["categorization","keyword","keyword_task"],"name":"zotonic_topic_render","title":"Render","uri":"https:\/\/zotonic.com\/id\/2641"},"seq":6}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":1337,"is_a":["text","documentation","reference","template_action"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1337"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_template_action_action_update","page_url":{"en":"https:\/\/zotonic.com\/docs\/1337\/update","x-default":"https:\/\/zotonic.com\/docs\/1337\/update"},"preview_url":null,"resource":{"version":4042,"pivot_location_lat":null,"title":"update","is_authoritative":true,"body":"<p>Updates the content of an HTML element with a template or a literal HTML text.<\/p>\n<p>Example:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-django\">&lt;div id=&quot;mydiv&quot;&gt;&lt;p&gt;Bye Bye.&lt;\/p&gt;&lt;\/div&gt;\n{% button text=&quot;hello&quot; action={update target=&quot;mydiv&quot; text=&quot;&lt;p&gt;Hello World!&lt;\/p&gt;&quot;} %}\n<\/code><\/pre>\n<p>When clicked, the contents of the div will be set to the HTML fragment &lt;p&gt;Hello World!&lt;\/p&gt;. This replaces any content present.<\/p>\n<div class=\"admonition note\"><p class=\"first admonition-title\">Note<\/p><p class=\"last\">Use the <a href=\"\/id\/doc_template_action_action_update_iframe\" class=\"doc-reference doc-reference-action\"><code>action#update_iframe<\/code><\/a> action for updating the contents of an <code>iframe<\/code> element.<\/p><\/div>\n<p>Another example, now rendering a template:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-django\">&lt;ul id=&quot;mylist&quot;&gt;&lt;li&gt;Some item&lt;\/li&gt;&lt;\/li&gt;\n{% button text=&quot;hello&quot; action={update target=&quot;mylist&quot; template=&quot;_list_item.tpl&quot; id=42} %}\n<\/code><\/pre>\n<p>This updates the &lt;ul\/&gt; with the output of the template _list_item.tpl. All arguments to the update action are\nalso arguments to the template.<\/p>\n<table class=\"table\"><thead><tr><th>Argument<\/th><th>Description<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td>target<\/td><td>The id of the element receiving the rendered HTML.<\/td><td><code>target=&quot;my-view&quot;<\/code><\/td><\/tr><tr><td>text<\/td><td>Literal HTML text to be inserted, no escaping will be done.<\/td><td><code>text=&quot;Hello &amp;lt;b&gt;World&lt;\/b&gt;&quot;<\/code><\/td><\/tr><tr><td>template<\/td><td>Name of the template to be rendered.<\/td><td><code>template=&quot;_list_view.tpl&quot;<\/code><\/td><\/tr><tr><td>include_all<\/td><td>Add this argument to include all templates with the same name. If not added then the best template will be used.<\/td><td><code>include_all<\/code><\/td><\/tr><tr><td>catinclude<\/td><td>Add this argument to use a <a href=\"\/id\/doc_template_tag_tag_catinclude\" class=\"doc-reference doc-reference-tag\"><code>tag#catinclude<\/code><\/a> instead of a normal include of the template. The <code>id<\/code> argument <em>must<\/em> be present for a catinclude to work.<\/td><td><code>catinclude id=1<\/code><\/td><\/tr><\/tbody><\/table>\n<p>All other arguments are passed as-is to the included template(s).<\/p>","slug":"update","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"c851bfa3595d589f49f1c327b5213454e39ff4f7087e45d1d1f5f5a81d4807e4","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":326,"is_a":["meta","category"],"name":"template_action","title":"Actions","uri":"https:\/\/test.zotonic.com\/id\/326"},"doc_source_path":"apps\/zotonic_mod_wires\/src\/actions\/action_wires_update.erl","publication_start":"2023-06-24T08:17:50Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_wires\/src\/actions\/action_wires_update.erl","pivot_location_lng":null,"doc_source_kind":"action","name":"doc_template_action_action_update","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:47:18Z","uri":null,"doc_status":"current","is_dependent":false,"erlang_app":"zotonic_mod_wires","publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"a9af6256d16f0717b59ea8dcf2a2e0565573bdd4\n","erlang_module":"action_wires_update","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-10-14T14:01:12Z","title_slug":"update"},"uri":"https:\/\/zotonic.com\/id\/1337","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1337"}},"status":"ok"}