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.

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

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

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

All named blocks in this template will replace the similar named blocks in the template page.tpl 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.

Edit on GitHub

now Tags print

Referred by


Templates are text files marked up using the Zotonic template language. Zotonic interprets that mark-up to dynamically…