Go to page content

extends

Inherit markup from another template.

Signal that this template extends another template.  The extends tag must be the first tag in a template that inherits from another template.  A template that extends another template contains only the extends tag and block tags.

Example:

{% extends "base.tpl" %}

All named blocks in this template will replace the similar named blocks in the template “base.tpl”.

Unlike Django the template name must be a string literal, variables are not allowed.

See also the {% block %}, {% inherit %} and {% overrules %} tags and template inheritance.

This page is part of the Zotonic documentation, which is licensed under the Apache License 2.0.