template value

This block is part of the value group and was last modified in core v10.4.28.

template value v10.4.28

Renders the given template using mustache.

In pins 2
  • value required
    value

    The template where values are inserted. It is possible use variables within the template in two ways: as escaped values (e.g., {{ field }}) or unescaped values (e.g., {{{ field }}}). Additionally, it is possible to: Loop over values using {{for field}} {{/field}}, check if a value exists with {{if field}} {{/field}}, and check if a value does not exist using {{if !field}} {{/field}}.

  • params
    object
Out pins 3
  • output
    value
  • success
    condition
  • error
    value

Renders the template with Mustache plus platform extensions: {{if x}}/{{if !x}}/{{for x}} sections, {{translate}}, {{scoped}}, and {{get}} lambdas, {{x.length}} on arrays, and comparison sections like {{#x == 1}}. The view comes from the object pin; nil values render as "" and entity/language keys are injected automatically. A template parse failure outputs value=nil, success=false and the message on error; an empty template outputs "" with success=true.

A typical wiring for template value: value feeds the value pin; if feeds the object pin; the value out pin feeds convert to uppercase.

Studio canvas example for the template value block: typical wiring for template value.

Commonly used with

In production blueprints, this block is most often wired together with:

  • new object: wired in both directions with this block. Builds a new object filled with the given fields.
  • value: feeds into this block. Simply returns the provided value.
  • if: feeds into this block.

Version history

Introduced in v10.4.28.

Service documentation

External API reference This block wraps a third-party service. Click here for the service's own documentation of the underlying endpoint.
Back to value Return to the main group to view all sub-groups Back to value Return to the group to view all blocks within this group