You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,9 +93,18 @@ and the second a metadata called `snapshot` (see next)
93
93
94
94
The line `1` will evaluate the bindings `title` and `who`, but the line `2`
95
95
will only eval the `who` variable, because it uses the snapshot of the previous
96
-
render. It only eval the changes and does not need to compile the binary again,
96
+
render. It only eval the changes and does not need to compile the binary again, unless the expression contains the global `Bindings` variable (see below),
97
97
because the `snapshot` includes the required information.
98
98
99
+
The global `Bindings` variable can be used to get values in a conditional way, checking if the variable exists in the template, e.g.:
100
+
101
+
```
102
+
<%= maps:get(foo, Bindings, bar) .%>
103
+
```
104
+
105
+
Including `Bindings` to the expression makes it to be always evaluated by the render function.
0 commit comments