{"result":{"depiction_url":null,"edges":{"in_module":{"objects":[{"created":"2020-05-30T05:47:25Z","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:25Z","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:25Z","object_id":{"id":1535,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_seo","title":"mod_seo","uri":"https:\/\/zotonic.com\/id\/1535"},"seq":1000000},{"created":"2020-05-30T05:47:25Z","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":"2020-05-30T05:47:25Z","object_id":{"id":1536,"is_a":["text","documentation","developerguide"],"name":"doc_developerguide_access_control","title":"Access control","uri":"https:\/\/zotonic.com\/id\/1536"},"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:47:54Z","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:47:54Z","object_id":{"id":1535,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_seo","title":"mod_seo","uri":"https:\/\/zotonic.com\/id\/1535"},"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:47:25Z","object_id":{"id":1537,"is_a":["text","documentation","reference","controller"],"name":"doc_controller_controller_template","title":"controller_template","uri":"https:\/\/zotonic.com\/id\/1537"},"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:47:54Z","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:54Z","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:54Z","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:54Z","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:54Z","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:54Z","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:54Z","object_id":{"id":2672,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_html","title":"HTML","uri":"https:\/\/zotonic.com\/id\/2672"},"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":1534,"is_a":["text","documentation","reference","controller"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1534"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_controller_controller_page","page_url":{"en":"https:\/\/zotonic.com\/docs\/1534\/controller_page","x-default":"https:\/\/zotonic.com\/docs\/1534\/controller_page"},"preview_url":null,"resource":{"version":4011,"pivot_location_lat":null,"title":"controller_page","is_authoritative":true,"body":"<p>Show a rsc as a HTML page.<\/p>\n<p>This controller is used to show the HTML page of a <a href=\"\/id\/doc_glossary#term-resource\">resource<\/a>. A “404 Not Found” or\n“410 Gone” page is shown if the requested page never existed or has been deleted.<\/p>\n<p>The user will be redirected to the <code>logon<\/code> URL when the current user is not allowed to view the page.<\/p>\n<p>This controller also adds a <code>noindex<\/code> response header when the page’s <code>seo_noindex<\/code>\nflag, documented by <a href=\"\/id\/doc_module_mod_seo\" class=\"doc-reference doc-reference-module\"><code>module#mod_seo<\/code><\/a>, is set.<\/p>\n<p>Example dispatch rule:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">{page, [&quot;page&quot;, id], controller_page, []}\n<\/code><\/pre>\n<h2>Dispatch arguments<\/h2>\n<p><code>controller_page<\/code> recognizes the following arguments inside the dispatch pattern:<\/p>\n<table class=\"table\"><thead><tr><th>Argument<\/th><th>Description<\/th><th>Example URL<\/th><\/tr><\/thead><tbody><tr><td><code>id<\/code><\/td><td>The id of the page (rsc) to be shown. This can be the numerical id or the unique name of a page.<\/td><td><code>\/page\/12345<\/code><\/td><\/tr><\/tbody><\/table>\n<h2>Dispatch options<\/h2>\n<p>The following options can be given to the dispatch rule:<\/p>\n<table class=\"table\"><thead><tr><th>Option<\/th><th>Description<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td><code>id<\/code><\/td><td>Id or unique name of the resource to be shown. This overrules any id in the query arguments. Use <code>user_id<\/code> for the id of the current user.<\/td><td><code>{id, page_about}<\/code><\/td><\/tr><tr><td><code>template<\/code><\/td><td>Name of the template to be rendered. Defaults to “page.tpl” Can also be a tuple of the following form: <code>{cat, Name}<\/code>. See also: <a href=\"\/id\/doc_template_tag_tag_catinclude\" class=\"doc-reference doc-reference-tag\"><code>tag#catinclude<\/code><\/a>.<\/td><td><code>{template, &quot;about.tpl&quot;}<\/code> <code>{template, {cat, &quot;home. tpl&quot;}}<\/code><\/td><\/tr><tr><td><code>cat<\/code><\/td><td>The category the resource that is requested has to be. If a page of a different category is requested, a 404 is shown.<\/td><td><code>{cat, text}<\/code><\/td><\/tr><tr><td><code>acl_action<\/code><\/td><td>What ACL action will be checked. Defaults to ‘view’; but can also be ‘edit’ if users need edit permission on the rsc to be able to access the resource.<\/td><td><code>{acl_action, edit}<\/code><\/td><\/tr><tr><td><code>acl<\/code><\/td><td>Extra authorization checks to be performed.<\/td><td>See <a href=\"#acl-options\">ACL options<\/a>.<\/td><\/tr><tr><td><code>is_canonical<\/code><\/td><td>Whether this URL should be considered the canonical URL of the page. If so, the controller will redirect to the rsc’s page path if set. Defaults to true.<\/td><td><code>{is_canonical, false}<\/code><\/td><\/tr><tr><td><code>seo_noindex<\/code><\/td><td>Ask crawlers to not index this page.<\/td><td><code>seo_noindex<\/code><\/td><\/tr><tr><td><code>nocache<\/code><\/td><td>Prevent browser caching this page.<\/td><td><code>nocache<\/code><\/td><\/tr><\/tbody><\/table>\n<h2>ACL options<\/h2>\n<p><a href=\"\/id\/doc_developerguide_access_control#guide-authorization\">Authorization<\/a> checks to perform, in addition to the <code>acl_action<\/code> dispatch option, can be given in the <code>acl<\/code> dispatch option, and accepts the following options:<\/p>\n<table class=\"table\"><thead><tr><th>ACL option<\/th><th>Description<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td><code>is_auth<\/code><\/td><td>Disable anonymous access to this resource.<\/td><td><code>{acl, is_auth}<\/code><\/td><\/tr><tr><td><code>logoff<\/code><\/td><td>Log out user before processing the request.<\/td><td><code>{acl, logoff}<\/code><\/td><\/tr><tr><td><code>{Action, Resource}<\/code><\/td><td>Check if user is allowed to perform <code>Action<\/code> on <code>Resource<\/code>. The example is equivalent to the options <code>{acl_action, edit}, {id, my_named_page}<\/code>.<\/td><td><code>{acl, {edit, my_named_page}}<\/code><\/td><\/tr><tr><td><code>[{Action, Resource}]<\/code><\/td><td>A list of checks to be performed, as above.<\/td><td><code>{acl, [{view, secret_page}, {update, 345}]}<\/code><\/td><\/tr><tr><td><code>ignore<\/code><\/td><td>Don’t perform any access control checks. Be careful to add your own checks in the rendered template and all its included templates.<\/td><td><code>{acl, ignore}<\/code><\/td><\/tr><\/tbody><\/table>","slug":"controller_page","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"5c51c3e053e9a35b6c56fb00b727152fdbaa8ed1a13dc09b6bd75782912ab1b2","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_page.erl","publication_start":"2023-06-24T08:17:47Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_base\/src\/controllers\/controller_page.erl","pivot_location_lng":null,"doc_source_kind":"controller","name":"doc_controller_controller_page","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:47:25Z","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":"652b4eddf9263041a2798f290b6c867343988a3f\n","erlang_module":"controller_page","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-10-06T13:25:11Z","title_slug":"controller_page"},"uri":"https:\/\/zotonic.com\/id\/1534","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1534"}},"status":"ok"}