{"result":{"depiction_url":null,"edges":{"in_module":{"objects":[{"created":"2020-05-30T05:47:50Z","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:47:50Z","object_id":{"id":1279,"is_a":["text","documentation"],"name":"doc_glossary","title":"Glossary","uri":"https:\/\/zotonic.com\/id\/1279"},"seq":1000000}],"predicate":{"id":332,"is_a":["meta","predicate"],"name":"references","title":{"_type":"trans","tr":{"en":"References"}},"uri":"https:\/\/zotonic.com\/id\/references"}},"subject":{"objects":[{"created":"2026-09-09T13:48:16Z","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:16Z","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:16Z","object_id":{"id":2608,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_routing_and_redirects","title":"Routing and redirects","uri":"https:\/\/zotonic.com\/id\/2608"},"seq":3},{"created":"2026-09-09T13:48:16Z","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":4},{"created":"2026-09-09T13:48:16Z","object_id":{"id":2673,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_javascript","title":"JavaScript","uri":"https:\/\/zotonic.com\/id\/2673"},"seq":5}],"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":2002,"is_a":["text","documentation","reference","template_action"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2002"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_template_action_action_redirect","page_url":{"en":"https:\/\/zotonic.com\/docs\/2002\/redirect","x-default":"https:\/\/zotonic.com\/docs\/2002\/redirect"},"preview_url":null,"resource":{"version":3991,"pivot_location_lat":null,"title":"redirect","is_authoritative":true,"body":"<p>This action redirects the browser to another page or back to the previous page.<\/p>\n<p>Example:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">{% button text=&quot;home&quot; action={redirect location=&quot;\/&quot;} %}\n<\/code><\/pre>\n<p>Redirects back to the home page when the button is clicked.<\/p>\n<p>Back in history example:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">{% button text=&quot;Back&quot; action={redirect back} %}\n<\/code><\/pre>\n<p>After clicking the button the browser will go back to the last page using the JavaScript history.<\/p>\n<p>Example of using dispatch rules for the redirect location:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">{% button text=&quot;edit&quot; action={redirect dispatch=&quot;admin_edit_rsc&quot; id=my_id} %}\n<\/code><\/pre>\n<p>When clicked the browser is redirected to the admin edit page for the <a href=\"\/id\/doc_glossary#term-resource\">resource<\/a> with\nthe id of my_id.<\/p>\n<p>This action can have the following arguments:<\/p>\n<table class=\"table\"><thead><tr><th>Argument<\/th><th>Description<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td>back<\/td><td>When given then the browser is directed to the previous page.<\/td><td>back<\/td><\/tr><tr><td>dispatch<\/td><td>The name of a dispatch rule. All other parameters are assumed to be parameters for the dispatch rule.<\/td><td>dispatch=”admin”<\/td><\/tr><tr><td>id<\/td><td>When back and dispatch are not defined then the redirect uri will be the <code>page_url<\/code> of the resource.<\/td><td><code>id=42<\/code><\/td><\/tr><tr><td>location<\/td><td>The http address to redirect to. Can be an url with or without host name.<\/td><td>location=”<a href=\"http:\/\/example.com\">http:\/\/example.com<\/a>“<\/td><\/tr><\/tbody><\/table>","slug":"redirect","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"48163baa58d7676a63ab719db392c1c8888bcd603968940f92f9970595da4b22","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_redirect.erl","publication_start":"2023-06-24T08:17:54Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_wires\/src\/actions\/action_wires_redirect.erl","pivot_location_lng":null,"doc_source_kind":"action","name":"doc_template_action_action_redirect","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:47:49Z","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":"b8c4b2ccdc223257f311968fbd17b2d66f0c4156\n","erlang_module":"action_wires_redirect","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-09-30T09:39:57Z","title_slug":"redirect"},"uri":"https:\/\/zotonic.com\/id\/2002","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2002"}},"status":"ok"}