diff options
Diffstat (limited to '')
-rw-r--r-- | book/src/template_syntax.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/book/src/template_syntax.md b/book/src/template_syntax.md index 4483562..0b76b22 100644 --- a/book/src/template_syntax.md +++ b/book/src/template_syntax.md @@ -176,6 +176,13 @@ inheritance. Blocks can only be specified at the top level of a template or inside other blocks, not inside `if`/`else` branches or in `for`-loop bodies. +It is also possible to use the name of the `block` in `endblock` (both in +declaration and use): + +```html +{% block content %}<p>Placeholder content</p>{% endblock content %} +``` + ### Child template Here's an example child template: @@ -458,3 +465,10 @@ You can place templates in a separate file and use it in your templates by using {% call scope::heading(s) %} ``` + +It is also possible to use the name of the `macro` in `endmacro` in the +declaration: + +```html +{% macro heading(arg) %}<p>{{arg}}</p>{% endmacro heading %} +``` |