Description
The Template component is a component that generates a string (text) from a specified template using placeholders.
The template syntax is a GoLang standard described on https://golang.org/pkg/text/template/.
tp. / tv. / ap. / av. / cp. / cv. are all referable to the template, so if these variables are referenced in the template, they will be replaced by their values.
Example:
| Template | Description |
|---|---|
{{.cv.Payload.LastName}} {{.cv.Payload.FirstName}} | Each variable's value replaces the double-curly-braced content containing a variable prefixed with a . |
| Output Payload | Description |
|---|---|
cv.Payload | Template string generated by the contents of a template string with variable parts replaced by variable values (text) |
Tip: If you write data into an av. variable (Action Variable) it will be available throughout the lifetime of the action also in other components.
Component Properties
| Name | Description |
|---|---|
| Syntax | Specify text or HTML. The value of cp.Syntax can be either "text" or "html". |
| Template | A string containing the variables to be replaced |