{"result":{"depiction_url":null,"edges":{"in_module":{"objects":[{"created":"2020-05-30T05:47:26Z","object_id":{"id":1296,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_base","title":"mod_base","uri":"https:\/\/zotonic.com\/id\/1296"},"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:26Z","object_id":{"id":1279,"is_a":["text","documentation"],"name":"doc_glossary","title":"Glossary","uri":"https:\/\/zotonic.com\/id\/1279"},"seq":1000000},{"created":"2020-05-30T05:47:26Z","object_id":{"id":1274,"is_a":["text","documentation","developerguide"],"name":"doc_developerguide_notifications","title":"Notifications","uri":"https:\/\/zotonic.com\/id\/1274"},"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:47:53Z","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:47:53Z","object_id":{"id":2564,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_backend_developer","title":"Backend developer","uri":"https:\/\/zotonic.com\/id\/2564"},"seq":2},{"created":"2026-09-09T13:47:53Z","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:47:53Z","object_id":{"id":2614,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_resource","title":"Resource","uri":"https:\/\/zotonic.com\/id\/2614"},"seq":4},{"created":"2026-09-09T13:47:53Z","object_id":{"id":2626,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_controller","title":"Controller","uri":"https:\/\/zotonic.com\/id\/2626"},"seq":5},{"created":"2026-09-09T13:47:53Z","object_id":{"id":2641,"is_a":["categorization","keyword","keyword_task"],"name":"zotonic_topic_render","title":"Render","uri":"https:\/\/zotonic.com\/id\/2641"},"seq":6},{"created":"2026-09-09T13:47:53Z","object_id":{"id":2676,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_http","title":"HTTP","uri":"https:\/\/zotonic.com\/id\/2676"},"seq":7}],"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":1567,"is_a":["text","documentation","reference","controller"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1567"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_controller_controller_id","page_url":{"en":"https:\/\/zotonic.com\/docs\/1567\/controller_id","x-default":"https:\/\/zotonic.com\/docs\/1567\/controller_id"},"preview_url":null,"resource":{"version":3981,"pivot_location_lat":null,"title":"controller_id","is_authoritative":true,"body":"<p>Handle different content representations of a page.<\/p>\n<p>Redirects to different representations of a page, depending on the requested content type. The redirect is done using a\n“303 See Other” status. A “404 Not Found” or “410 Gone” is returned if the requested page never existed or\nhas been deleted.<\/p>\n<p>When no content types are requested then <code>text\/html<\/code> is selected.<\/p>\n<p>This controller is also used for a page’s short url representation.<\/p>\n<p>Example dispatch rule (from mod_base):<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">{id, [&quot;id&quot;, id], controller_id, []}\n<\/code><\/pre>\n<p>This controller does not have any dispatch options.<\/p>\n<p>This controller handles the following query argument:<\/p>\n<table class=\"table\"><thead><tr><th>Option<\/th><th>Description<\/th><th>Example URL<\/th><\/tr><\/thead><tbody><tr><td><code>id<\/code><\/td><td>Id of the requested <a href=\"\/id\/doc_glossary#term-resource\">resource<\/a>.<\/td><td><code>\/id\/1234<\/code><\/td><\/tr><\/tbody><\/table>\n<p>The list of provided content types is collected with a foldr notification (see\n<a href=\"\/id\/doc_developerguide_notifications#guide-notification\">Notifications<\/a>) of the type <code>content_types_dispatch<\/code>. Modules\nshould add their provided content types in front of the accumulator. The added entries are tuples: <code>{MimeType, DispatchRuleName}<\/code>.<\/p>\n<p>Example of adding a content type handler adding a text\/plain handler with the dispatch rule <code>rsc_text<\/code>:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">observe_content_types_dispatch(#content_types_dispatch{}, Acc, _Context) -&gt;\n    [{&quot;text\/plain&quot;, rsc_text} | Acc].\n<\/code><\/pre>","slug":"controller_id","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"ff43f734d1299ce6dd2a77aad08384e21e1f308284d1fa49c8d2a02ab7bb38c0","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":321,"is_a":["meta","category"],"name":"controller","title":"Controllers","uri":"https:\/\/test.zotonic.com\/id\/321"},"doc_source_path":"apps\/zotonic_mod_base\/src\/controllers\/controller_id.erl","publication_start":"2023-06-24T08:17:44Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_base\/src\/controllers\/controller_id.erl","pivot_location_lng":null,"doc_source_kind":"controller","name":"doc_controller_controller_id","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:47:26Z","uri":null,"doc_status":"current","is_dependent":false,"erlang_app":"zotonic_mod_base","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":"85498256abd162b9bc082d43a90c995844fd4408\n","erlang_module":"controller_id","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-09-29T14:40:14Z","title_slug":"controller_id"},"uri":"https:\/\/zotonic.com\/id\/1567","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1567"}},"status":"ok"}