{"result":{"depiction_url":null,"edges":{"hasreference":{"objects":[{"created":"2026-10-07T11:13:46Z","object_id":{"id":2940,"is_a":["text","documentation","developerguide"],"name":"developer_request_path","title":{"_type":"trans","tr":{"en":"Follow a request to its template"}},"uri":"https:\/\/zotonic.com\/id\/2940"},"seq":1},{"created":"2026-10-07T11:13:46Z","object_id":{"id":2944,"is_a":["text","documentation","developerguide"],"name":"developer_resource_links","title":{"_type":"trans","tr":{"en":"Link to resources and dispatch routes"}},"uri":"https:\/\/zotonic.com\/id\/2944"},"seq":2},{"created":"2026-10-07T11:13:46Z","object_id":{"id":2934,"is_a":["text","documentation","developerguide"],"name":"developer_cli_dispatch","title":{"_type":"trans","tr":{"en":"Trace URL dispatch from the command line"}},"uri":"https:\/\/zotonic.com\/id\/2934"},"seq":3},{"created":"2026-10-07T11:13:46Z","object_id":{"id":3001,"is_a":["text","documentation","developerguide"],"name":"developer_wrong_route","title":{"_type":"trans","tr":{"en":"A URL reaches the wrong page"}},"uri":"https:\/\/zotonic.com\/id\/3001"},"seq":4}],"predicate":{"id":2774,"is_a":["meta","predicate"],"name":"hasreference","title":{"_type":"trans","tr":{"en":"Documentation reference"}},"uri":"https:\/\/zotonic.com\/id\/hasreference"}},"references":{"objects":[{"created":"2020-05-30T05:48:23Z","object_id":{"id":1540,"is_a":["text","documentation","developerguide"],"name":"doc_developerguide_controllers","title":{"_type":"trans","tr":{"en":"Add an HTTP controller"}},"uri":"https:\/\/zotonic.com\/id\/1540"},"seq":1000000},{"created":"2020-05-30T05:48:23Z","object_id":{"id":1534,"is_a":["text","documentation","reference","controller"],"name":"doc_controller_controller_page","title":"controller_page","uri":"https:\/\/zotonic.com\/id\/1534"},"seq":1000000},{"created":"2020-05-30T05:48:23Z","object_id":{"id":1388,"is_a":["text","documentation","reference","template_scomp"],"name":"doc_template_scomp_scomp_debug","title":"debug","uri":"https:\/\/zotonic.com\/id\/1388"},"seq":1000000},{"created":"2020-05-30T05:48:23Z","object_id":{"id":321,"is_a":["meta","category"],"name":"controller","title":"Controllers","uri":"https:\/\/test.zotonic.com\/id\/321"},"seq":1000000},{"created":"2020-05-30T05:48:23Z","object_id":{"id":1382,"is_a":["text","documentation","reference","template_tag"],"name":"doc_template_tag_tag_url","title":"url","uri":"https:\/\/zotonic.com\/id\/1382"},"seq":1000000},{"created":"2020-05-30T05:48:23Z","object_id":{"id":2019,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_dispatch_rewrite","title":"observe_dispatch_rewrite\/3","uri":"https:\/\/zotonic.com\/id\/2019"},"seq":1000000},{"created":"2020-05-30T05:48:23Z","object_id":{"id":1527,"is_a":["text","documentation","developerguide"],"name":"doc_developerguide_sites","title":{"_type":"trans","tr":{"en":"Create your first site"}},"uri":"https:\/\/zotonic.com\/id\/1527"},"seq":1000000},{"created":"2020-05-30T05:48:23Z","object_id":{"id":1817,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_dispatch_host","title":"observe_dispatch_host\/2","uri":"https:\/\/zotonic.com\/id\/1817"},"seq":1000000},{"created":"2020-05-30T05:48:23Z","object_id":{"id":1528,"is_a":["text","documentation","developerguide"],"name":"doc_developerguide_status_site","title":{"_type":"trans","tr":{"en":"Find the status site and your site&#39;s admin"}},"uri":"https:\/\/zotonic.com\/id\/1528"},"seq":1000000},{"created":"2020-05-30T05:48:23Z","object_id":{"id":1777,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_custom_redirect","title":"mod_custom_redirect","uri":"https:\/\/zotonic.com\/id\/1777"},"seq":1000000},{"created":"2020-05-30T05:48:23Z","object_id":{"id":2156,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_dispatch","title":"observe_dispatch\/2","uri":"https:\/\/zotonic.com\/id\/2156"},"seq":1000000},{"created":"2020-05-30T05:48:23Z","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":332,"is_a":["meta","predicate"],"name":"references","title":{"_type":"trans","tr":{"en":"References"}},"uri":"https:\/\/zotonic.com\/id\/references"}},"refers":{"objects":[{"created":"2026-10-07T11:13:01Z","object_id":{"id":2941,"is_a":["text","documentation","developerguide"],"name":"developer_template_selection","title":{"_type":"trans","tr":{"en":"Find the template used by a page"}},"uri":"https:\/\/zotonic.com\/id\/2941"},"seq":1000000},{"created":"2026-10-07T11:13:01Z","object_id":{"id":2975,"is_a":["text","documentation","developerguide"],"name":"developer_dispatch_debugging","title":{"_type":"trans","tr":{"en":"Trace a URL through dispatch"}},"uri":"https:\/\/zotonic.com\/id\/2975"},"seq":1000000},{"created":"2026-10-07T11:13:01Z","object_id":{"id":3001,"is_a":["text","documentation","developerguide"],"name":"developer_wrong_route","title":{"_type":"trans","tr":{"en":"A URL reaches the wrong page"}},"uri":"https:\/\/zotonic.com\/id\/3001"},"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:23Z","object_id":{"id":1777,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_custom_redirect","title":"mod_custom_redirect","uri":"https:\/\/zotonic.com\/id\/1777"},"seq":1000000},{"created":"2020-05-30T05:48:23Z","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":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-10-07T11:13:46Z","object_id":{"id":2554,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_how_to_guide","title":"How-to guide","uri":"https:\/\/zotonic.com\/id\/2554"},"seq":1},{"created":"2026-10-07T11:13:46Z","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-10-07T11:13:46Z","object_id":{"id":2628,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_dispatch_rule","title":"Dispatch rule","uri":"https:\/\/zotonic.com\/id\/2628"},"seq":3},{"created":"2026-10-07T11:13:46Z","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":4}],"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":1541,"is_a":["text","documentation","developerguide"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1541"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_developerguide_dispatch_rules","page_url":{"en":"https:\/\/zotonic.com\/docs\/1541\/follow-a-request-to-its-template","x-default":"https:\/\/zotonic.com\/docs\/1541\/follow-a-request-to-its-template"},"preview_url":null,"resource":{"version":44,"pivot_location_lat":null,"title":{"_type":"trans","tr":{"en":"Follow a request to its template"}},"is_authoritative":true,"body":{"_type":"trans","tr":{"en":"<p>Run <code>bin\/zotonic dispatch garden \/welcome<\/code>. Read the selected dispatch name, controller, and arguments. A template controller renders its configured template. A page controller also works with a content resource, often available as <code>id<\/code> in the template.<\/p>\n<p>Next, inspect the active template selected for that name. Includes and category variants can select additional files from other active modules. Use <a href=\"\/id\/2941\">Find the template used by a page<\/a> to find those files. Test the actual browser request too: dispatch inspection does not reproduce every authentication, language, or response condition.<\/p>\n<h2>Link to resources and dispatch routes<\/h2>\n<p>Use a resource&#39;s page URL when linking to content. This lets Zotonic account for its path and language.<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-django\">&lt;a href=&quot;{{ m.rsc.page_home.page_url }}&quot;&gt;{_ Home _}&lt;\/a&gt;\n<\/code><\/pre>\n<p>For an application endpoint, use a named dispatch route:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-django\">&lt;a href=&quot;{% url admin %}&quot;&gt;{_ Admin _}&lt;\/a&gt;\n<\/code><\/pre>\n<p>Do not add separate normal content routes for each language. Configure the resource and language support instead. Avoid building internal URLs by joining strings: escaping, optional arguments, and language prefixes belong to the dispatcher.<\/p>\n<h2>Trace URL dispatch from the command line<\/h2>\n<p>Use dispatch inspection to discover why a path selects a particular controller:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-sh\">bin\/zotonic dispatch garden\nbin\/zotonic dispatch garden detail\nbin\/zotonic dispatch garden \/welcome\n<\/code><\/pre>\n<p>The first form lists site rules, the second includes detail, and the third traces a path. You can also pass a full URL to include hostname-based site selection.<\/p>\n<p>Compare the selected rule, controller, options, and any path rewriting with your expectation. Earlier applicable rules can win over a broad catch-all later in the list.<\/p>\n<p>This is a dispatch diagnosis, not a substitute for making the HTTP request and checking authorization and rendering. See <a href=\"\/id\/2975\">Trace a URL through dispatch<\/a> and <a href=\"\/id\/3001\">A URL reaches the wrong page<\/a>.<\/p>\n<h2>A URL reaches the wrong page<\/h2>\n<p>Confirm the hostname, site, and path from the actual request. Use the dispatch trace to see the selected rule and any rewritten path.<\/p>\n<p>Check route order and arguments, then inspect resource page paths and language handling if the URL is content-driven. A path tested against the wrong site can produce a convincing but irrelevant trace.<\/p>\n<p>After changing a rule or resource path, refresh the relevant information and test the browser request, including its redirects. Verify another nearby URL to catch an overly broad match.<\/p>"}},"is_mailing_opt_out":false,"slug":"follow-a-request-to-its-template","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"is_featured":false,"content_group_id":{"id":339,"is_a":["meta","content_group"],"name":"default_content_group","title":{"_type":"trans","tr":{"en":"Default Content Group"}},"uri":"https:\/\/zotonic.com\/id\/default_content_group"},"category_id":{"id":317,"is_a":["meta","category"],"name":"developerguide","title":"Developer guide","uri":"https:\/\/zotonic.com\/id\/developerguide"},"publication_start":"2022-02-15T10:01:00Z","is_website_redirect":false,"github_url":"https:\/\/github.com\/zotonic\/zotonic\/tree\/master\/doc\/developer-guide\/dispatch-rules.rst","pivot_location_lng":null,"name":"doc_developerguide_dispatch_rules","is_unfindable":false,"is_published":true,"doc_editorial_edges":{"hasreference":[2934,2940,2944,3001],"subject":[2554,2564,2608,2628]},"summary":{"_type":"trans","tr":{"en":"Start with the URL that gives an unexpected result. Check its hostname: Zotonic uses it to select a site before matching the site&#39;s dispatch rules."}},"pivot_geocode":null,"custom_slug":false,"created":"2020-05-30T05:47:25Z","uri":null,"date_is_all_day":false,"is_dependent":false,"is_page_path_multiple":false,"publication_end":"9999-08-17T12:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_editorial_bundle":true,"creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"seo_noindex":false,"modified":"2026-10-07T20:45:38Z","title_slug":{"_type":"trans","tr":{"en":"follow-a-request-to-its-template"}}},"uri":"https:\/\/zotonic.com\/id\/1541","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1541"}},"status":"ok"}