September 2017
Beginner to intermediate
396 pages
9h 46m
English
In this recipe, rather than binding to a static string, we created a splice (which is a monadic computation). We created a binding between a tag and the splice, and inserted this binding into a HeistState. The templates that are rendered in the given HeistState will dynamically apply these bindings and call the splice to create a resultant template.
It is thus possible to embed an arbitrary computation, such as doing a database query, calling a backend microservice, and so on, and populate the template using the splices. In this recipe, we bound a <currenttime/> tag. The contents of this tag serve as an input to the splice. In this case, it is a time format in which the time should be output.
Read now
Unlock full access