add in-memory includes via include_template

This commit is contained in:
pantor committed 2018-05-14 20:21:29 +02:00
1 parent 95e3712aaf
commit cb18e2cd0c
3 files changed
+41 -14

No files matched your search

+7 -2
View File
@@ -157,9 +157,14 @@ render("{% if not guest_count %}…{% endif %}", data); // True
#### Includes
This includes other template files, relative from the current file location.
You can either include other template files or already parsed templates.
```
{% include "footer.html" %}
// Other template files are included relative from the current file location
render({% include "footer.html" %}, data);
// To include in-memory templates, add them to the environment first
env.include_template("footer", temp);
render({% include "footer" %}, data);
```
### Functions