-
Notifications
You must be signed in to change notification settings - Fork 2
En Template Language
lvanderlyn edited this page Aug 15, 2025
·
2 revisions
Anything between {{ }} will be interpreted as an expression and the result of that expression will be evaluated to the user
-
{{ VAR }}-> will output the value of the variableVAR -
{{ VAR + 5 }}-> will output the value ofVARplus the number 5 -
{{ VAR == 5 }}-> will outputTrueifVARis equal to 5 otherwiseFalse
The syntax language supports the creation and evaluation of arbitrarily complex expressions, but does not support assignment.
It is important to leave a space between the braces and the input
It is important to refer to variables with the same capitalisation they were defined with.
The template syntax also supports returning information from tables.
-
{{ TABLE_NAME.RETURN_COLUMN(LOOKUP_COLUMN=VAR) }}-> returns the value of an entry from the columnRETURN_COLUMNfrom the tableTABLE_NAMEat the row where the columnLOOKUP_COLUMNhas the value stored inVAR.- For example, if you have a table called "hotel_costs", with a column "country" and a column "cost" the following expression:
{{ hotel_costs.cost(country="Spain") }}would return the cost associated with the given country "Spain".
- For example, if you have a table called "hotel_costs", with a column "country" and a column "cost" the following expression:
-
{{ TABLE_NAME.COLUMN_NAME(VAR1=VAL1, VAR2=VAL2) }}-> returns the value ofCOLUMN_NAMEfrom the tableTABLE_NAMEat the row where the columnVAR1has has the value stored inVAL1and the columnVAR2has the value stored inVAL2-
{{ DAILY_COSTS.PER_DIAM(COUNTRY=USER_COUNTRY, CITY=USER_CITY) }}-> Returns the Per diam from the table daily costs, for the country and city specified by the user (via the variablesUSER_COUNTRYandUSER_CITY)
-