# overrules

Source: https://zotonic.com/docs/1348/overrules

URI: https://zotonic.com/id/1348

Language: en



::: {.aside}
See also

<a href="/id/doc_template_tag_tag_block" class="doc-reference doc-reference-tag"><code>tag#block</code></a>, <a href="/id/doc_template_tag_tag_inherit" class="doc-reference doc-reference-tag"><code>tag#inherit</code></a>, <a href="/id/doc_template_tag_tag_fragment" class="doc-reference doc-reference-tag"><code>tag#fragment</code></a> and <a href="/id/doc_template_tag_tag_extends" class="doc-reference doc-reference-tag"><code>tag#extends</code></a>.
:::

Inherit markup from like named template in another module.

Signal that this template extends a template with the same name in a module with lower priority.

::: {.note title="Note"}
A template that overrules another template contains only the [overrules](#tag-overrules) tag and <a href="/id/doc_template_tag_tag_block" class="doc-reference doc-reference-tag"><code>tag#block</code></a> tags.
:::

The overrules tag must be the first tag in the template.

Example, say a template “page.tpl” contains the following:

```django
{% overrules %}
{% block title %} My new title {% endblock %}
```

All named template blocks will replace the similar named template blocks in the overruled page.tpl template that is “next in line” to be used.

This is useful if you want to use a template from a module, and the template is mentioned in (for example) a dispatch rule. Now you can overrule and extend that template in your own modules without changing the dispatch rules or the original module.

Make sure your module has a higher priority (lower number) than the module containing the overruled template.

Arguments
---------

The `overrules` tag can pass extra variables to the overruled template and inherited fragments:

```django
{% overrules site_name="Example" %}
```

The `with` keyword is optional:

```django
{% overrules with site_name="Example" %}
```

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1348?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/1348?language=en>)
