{"result":{"depiction_url":null,"edges":{"in_module":{"objects":[{"created":"2026-09-30T09:18:26Z","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":1}],"predicate":{"id":333,"is_a":["meta","predicate"],"name":"in_module","title":{"_type":"trans","tr":{"en":"In module"}},"uri":"https:\/\/zotonic.com\/id\/in_module"}},"subject":{"objects":[{"created":"2026-09-30T09:18:26Z","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-30T09:18:26Z","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-30T09:18:26Z","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-30T09:18:26Z","object_id":{"id":2625,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_model","title":"Model","uri":"https:\/\/zotonic.com\/id\/2625"},"seq":4},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2673,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_javascript","title":"JavaScript","uri":"https:\/\/zotonic.com\/id\/2673"},"seq":5},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2718,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_cotonic","title":"Cotonic","uri":"https:\/\/zotonic.com\/id\/2718"},"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":2755,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2755"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_zotonic_cotonic_model_alert","page_url":{"en":"https:\/\/zotonic.com\/cotonic\/zotonic-models\/alert","x-default":"https:\/\/zotonic.com\/cotonic\/zotonic-models\/alert"},"preview_url":null,"resource":{"version":17,"pivot_location_lat":null,"title":"model\/alert","is_authoritative":true,"body":"<h1>model\/alert<\/h1>\n<p>Displays a Zotonic alert dialog through the wires script and <code>z_dialog_alert<\/code>.\nThe page must have the normal Zotonic dialog support loaded.<\/p>\n<h2>post<\/h2>\n<p>Topic: <code>model\/alert\/post<\/code>.<\/p>\n<p>The payload is an options object:<\/p>\n<table class=\"table\"><thead><tr><th>Field<\/th><th>Meaning<\/th><\/tr><\/thead><tbody><tr><td><code>text<\/code><\/td><td>Dialog body, inserted as HTML.<\/td><\/tr><tr><td><code>title<\/code><\/td><td>Dialog title, inserted as HTML; defaults to the translated “Alert”.<\/td><\/tr><tr><td><code>ok<\/code><\/td><td>Confirmation button label, inserted as HTML; defaults to the translated “OK”.<\/td><\/tr><tr><td><code>width<\/code><\/td><td>Optional dialog width.<\/td><\/tr><\/tbody><\/table>\n<p>All three fields, <code>text<\/code>, <code>title<\/code>, and <code>ok<\/code>, are rendered as HTML without\nescaping or sanitization by this handler. HTML-escape untrusted plain text before\nsupplying it. If markup is intended, sanitize it before sending the command.<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-javascript\">cotonic.broker.publish(&quot;model\/alert\/post&quot;, {\n    title: &quot;Upload complete&quot;,\n    text: &quot;The document is ready.&quot;,\n    ok: &quot;Close&quot;\n});\n<\/code><\/pre>\n<p>The command does not reply and does not publish a model event. Use <code>publish<\/code>,\nnot <code>call<\/code>. JavaScript function callbacks cannot be sent through worker messages.<\/p>\n<h2>Implementation<\/h2>\n<p><a href=\"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_wires\/priv\/lib\/js\/apps\/zotonic-wired.js\">JavaScript source<\/a>.<\/p>","slug":"model-alert","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"f0c7c416776a420a13b71cc30741a604cfe1368ca0a36e5af17d73093395a3b9","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":2723,"is_a":["meta","category"],"name":"cotonic_model","title":"Cotonic models","uri":"https:\/\/zotonic.com\/id\/cotonic_model"},"doc_source_path":"doc\/cotonic-models\/alert.md","publication_start":"2026-09-30T09:18:26Z","page_path":"\/cotonic\/zotonic-models\/alert","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/doc\/cotonic-models\/alert.md","pivot_location_lng":null,"doc_source_kind":"cotonic_model","name":"doc_zotonic_cotonic_model_alert","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2026-09-30T09:18:26Z","uri":null,"doc_status":"current","is_dependent":false,"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":"b8c4b2ccdc223257f311968fbd17b2d66f0c4156\n","creator_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"modified":"2026-09-30T09:40:08Z","title_slug":"model-alert"},"uri":"https:\/\/zotonic.com\/id\/2755","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2755"}},"status":"ok"}