template_execute(batch_name, template_name, tuple{...})
Executes the specified template, within the given batch name, passing the tuple as context (.) and returning the expanded template string.
See the template guide for details on how to write templates.
A number of template functions are provided for use within template «actions»:
contains(Gostrings.Contains)hasPrefix(Gostrings.HasPrefix)hasSuffix(Gostrings.HasSuffix)render(convert value to HTML)query_unescape(Gourl.QueryUnescape)link(creates an HTML link fromtuple{key:str, name:str})is_numeric
Examples
Load and register a template from a string
template_register(
"t1",
dee(template_name:="test_page",
template_content:="Test «.var1»"
)
)
template_execute(
"t1",
"test_page",
tuple{var1:="value1"}
)
Test value1