From 3d8eb31389db8ad0cb15f82c3050229cac0939b8 Mon Sep 17 00:00:00 2001 From: overflowerror Date: Sat, 5 Jun 2021 23:57:34 +0200 Subject: [PATCH] added explaination of render structure block to readme --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 68b10b0..9dd02f1 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,27 @@ Example: {{ "foo: %s - %d", "bar", 69 }} ``` +### Structure Block + +Structure blocks have the following syntax: + +``` +{# [structure command] ( [parameters] ) #} +``` + +At the moment there is only one structure command implemented. + +## Render + +Using the render command, a another template can be included at the current position. The first parameter is the name of the template to be included as a string. All following parameters will be used as template parameters. + +Example: +``` +{# render("templates/index.html.templ", "Page Title", userArray, userArrayLength) #} +``` + +All used variables have to be declared (for example as template parameters or local variables of statement blocks). + ### Complete Example ```