Index: README.md |
diff --git a/README.md b/README.md |
index c7d2cb182d5d3171a553c1f50ef599bf5f7f3289..38068a7d2b8055c50539219ed4a0d668845378ca 100644 |
--- a/README.md |
+++ b/README.md |
@@ -250,9 +250,34 @@ Markdown. |
Complicated pages can be defined using the |
[Jinja2 template format](http://jinja.pocoo.org/docs/templates/). Automatic |
escaping is active so by default values inserted into the page cannot contain |
-any HTML code. Any content between `<head>` and `</head>` tags will be inserted |
-into the head of the generated web page, everything else defined the content of |
-the page. |
+any HTML code. |
+ |
+For Jinja2 pages that make use of the `{% extends ... %}` tag, template |
+inheritance is left to Jinja2. It is expected you will populate blocks like |
+`body` and `head` manually from those pages and have the corresponding blocks in |
+the parent template. |
+ |
+If a Jinja2 page does not contain an `{% extends ... %}` tag however the CMS |
+will take care of template inheritance as with the other formats. The template |
+as specified in the `template` option will be used by the CMS. Anything between |
+the `<head>` and `</head>` tags will be inserted into a `head` variable, the |
+rest into a `body` variable. |
+ |
+_Note: if you do not use the {% extends ... %} tag the parent template will not |
+have access to any of the page's state. Blocks, variables etc defined in the |
+page will not be available for use from the template._ |
+ |
+If you would like your template to support both Jinja2 and standard template |
+inheritance it is recommended to follow this pattern: |
+ |
+ ... |
+ {% block head %} |
+ {% head|safe %} |
+ {% endblock %} |
+ ... |
+ {% block body %} |
+ {% body|safe %} |
+ {% endblock %} |
The following variables can be used: |