extends

Inherit markup from another template.

Note

A template that extends another template contains only the extends tag and template tag#block tags.

Signal that this template extends another template. The extends tag must be the first tag in a template that inherits from another template.

Example:

{% extends "base.tpl" %}

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

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

Arguments

The extends tag can pass extra variables to the extended template and inherited fragments:

{% extends "base.tpl" section="news" %}

For compatibility with other tags, the with keyword is also accepted:

{% extends "base.tpl" with section="news" %}

These arguments extend the current template context while the extended template is rendered.

Edit on GitHub

block Tags overrules

Referred by

Tags

block

Define a template block and overrules a template block from an inherited template.

Developer guide

Modules

Modules are the building blocks of Zotonic. They add functionality to your Zotonic website such as:

Developer guide

Templates

Templates are text files marked up using the Zotonic template language. Zotonic interprets that mark-up to dynamically generate HTML pages. Zotonic’s template…