{"result":{"depiction_url":null,"edges":{"hasreference":{"objects":[{"created":"2026-10-07T11:13:42Z","object_id":{"id":1348,"is_a":["text","documentation","reference","template_tag"],"name":"doc_template_tag_tag_overrules","title":"overrules","uri":"https:\/\/zotonic.com\/id\/1348"},"seq":1},{"created":"2026-10-07T11:13:42Z","object_id":{"id":2924,"is_a":["text","documentation","developerguide"],"name":"developer_module_priority","title":{"_type":"trans","tr":{"en":"Dependencies, capabilities, and module priority"}},"uri":"https:\/\/zotonic.com\/id\/2924"},"seq":2}],"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:07Z","object_id":{"id":1353,"is_a":["text","documentation","developerguide"],"name":"doc_developerguide_modules","title":{"_type":"trans","tr":{"en":"Create a reusable module"}},"uri":"https:\/\/zotonic.com\/id\/1353"},"seq":1000000},{"created":"2020-05-30T05:48:07Z","object_id":{"id":1352,"is_a":["text","documentation","developerguide"],"name":"doc_developerguide_templates","title":{"_type":"trans","tr":{"en":"Create a page layout"}},"uri":"https:\/\/zotonic.com\/id\/1352"},"seq":1000000},{"created":"2020-05-30T05:48:07Z","object_id":{"id":1274,"is_a":["text","documentation","developerguide"],"name":"doc_developerguide_notifications","title":{"_type":"trans","tr":{"en":"Respond to a notification"}},"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"}},"refers":{"objects":[{"created":"2026-10-07T11:13:02Z","object_id":{"id":1348,"is_a":["text","documentation","reference","template_tag"],"name":"doc_template_tag_tag_overrules","title":"overrules","uri":"https:\/\/zotonic.com\/id\/1348"},"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":"2026-10-07T11:13:43Z","object_id":{"id":2924,"is_a":["text","documentation","developerguide"],"name":"developer_module_priority","title":{"_type":"trans","tr":{"en":"Dependencies, capabilities, and module priority"}},"uri":"https:\/\/zotonic.com\/id\/2924"},"seq":1},{"created":"2026-10-07T11:13:43Z","object_id":{"id":3000,"is_a":["text","documentation","developerguide"],"name":"developer_changes_not_loaded","title":{"_type":"trans","tr":{"en":"A saved change does not appear"}},"uri":"https:\/\/zotonic.com\/id\/3000"},"seq":2},{"created":"2020-05-30T05:48:07Z","object_id":{"id":1581,"is_a":["text","documentation","cookbook"],"name":"doc_cookbook_error_pages","title":{"_type":"trans","tr":{"en":"Customize HTTP error pages"}},"uri":"https:\/\/zotonic.com\/id\/1581"},"seq":3}],"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:43Z","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:43Z","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-10-07T11:13:43Z","object_id":{"id":2620,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_template","title":"Template","uri":"https:\/\/zotonic.com\/id\/2620"},"seq":3},{"created":"2026-10-07T11:13:43Z","object_id":{"id":2641,"is_a":["categorization","keyword","keyword_task"],"name":"zotonic_topic_render","title":"Render","uri":"https:\/\/zotonic.com\/id\/2641"},"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":1577,"is_a":["text","documentation","cookbook"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1577"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_cookbook_overriding","page_url":{"en":"https:\/\/zotonic.com\/cookbook\/1577\/override-a-module-template","x-default":"https:\/\/zotonic.com\/cookbook\/1577\/override-a-module-template"},"preview_url":null,"resource":{"body":{"_type":"trans","tr":{"en":"<p>Find the active template and its path relative to <code>priv\/templates<\/code>. Create the same relative path in your site or another active module with a higher selection priority.<\/p>\n<p>Copy only the structure you need to change. When the original template offers blocks, extend it using the supported inheritance pattern rather than duplicating a large file. Check <a href=\"\/id\/1348\" class=\"doc-reference doc-reference-tag\"><code>tag#overrules<\/code><\/a> for extending the next matching template.<\/p>\n<p>Load the affected page and inspect the selected template again. A successful compile does not prove that your override is used. Test neighboring categories and languages if the original template serves more than one page type.<\/p>\n<p>For example, place this in the same relative template path as the template being overridden:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-django\">{% overrules %}\n{% block content %}\n    {% inherit %}\n    &lt;p&gt;{_ Contact us for more information. _}&lt;\/p&gt;\n{% endblock %}\n<\/code><\/pre>\n<p>Use a block that exists in the original. <code>{% inherit %}<\/code> keeps its content; omit it only when replacing that entire block is intentional. This is especially important for admin panels, where copying a small fragment over a large panel can remove controls.<\/p>\n<h2>Dependencies, capabilities, and module priority<\/h2>\n<p>The main site or module can declare:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">-mod_depends([mod_base]).\n-mod_prio(500).\n<\/code><\/pre>\n<p>Dependencies express requirements for activation. Modules can also declare provided capabilities with <code>-mod_provides<\/code>; depend on an established capability when your feature requires that service rather than one particular implementation.<\/p>\n<p>Priority determines ordering when modules supply competing resources such as templates. Lower numerical priorities take precedence. Sites commonly use a low priority so their templates override generic module templates.<\/p>\n<p>Do not use priority to hide a missing dependency or duplicate Erlang module name. Check which modules are active, inspect the selected template, and make one intentional override at a time.<\/p>"}},"category_id":{"id":318,"is_a":["meta","category"],"name":"cookbook","title":{"_type":"trans","tr":{"en":"Cookbook"}},"uri":"https:\/\/test.zotonic.com\/id\/318"},"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"},"created":"2020-05-30T05:47:26Z","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"doc_editorial_bundle":true,"doc_editorial_edges":{"hasreference":[1348,2924],"relation":[2924,3000],"subject":[2554,2563,2620,2641]},"github_url":"https:\/\/github.com\/zotonic\/zotonic\/tree\/master\/doc\/cookbook\/overriding.rst","is_authoritative":true,"is_dependent":false,"is_featured":false,"is_protected":false,"is_published":true,"is_unfindable":false,"language":["en"],"modified":"2026-10-07T11:13:53Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"name":"doc_cookbook_overriding","pivot_geocode":null,"pivot_location_lat":null,"pivot_location_lng":null,"privacy":0,"publication_end":"9999-06-01T00:00:00Z","publication_start":"2022-02-15T10:01:21Z","slug":"override-a-module-template","summary":{"_type":"trans","tr":{"en":"Find the active template and its path relative to priv\/templates. Create the same relative path in your site or another active module with a higher selection priority."}},"title":{"_type":"trans","tr":{"en":"Override a module template"}},"title_slug":{"_type":"trans","tr":{"en":"override-a-module-template"}},"tz":"UTC","uri":null,"version":40,"visible_for":0},"uri":"https:\/\/zotonic.com\/id\/1577","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1577"}},"status":"ok"}