Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Formatters

Formatters transform System Variable values during rendering. They provide consistent output for dates, names, addresses, HTML, and other supported values.

Multiple formatters can be chained, and each formatter receives the output of the previous formatter.

Syntax

{{ variable|formatter_key }}
{{ variable|formatter_key(arg1, arg2) }}

Chain multiple formatters with additional pipe characters:

{{ variable|formatter_key1|formatter_key2(arg) }}

Available Formatters

Formatter key
Description
Arguments (optional)
Example
Result (example output)

date

Twig-compatible date formatter (overrides Twig default to return empty string for empty values).

format: string, timezone: string

{{ system.date|date('Y-m-d H:i', 'Europe/Berlin') }}

2026-04-29 14:30

format_date

Formats a value as date.

dateFormat: string

{{ system.date|format_date('d.m.Y') }}

29.04.2026

format_date_database

Formats a value using database date format.

dateFormat: string

{{ system.date|format_date_database }}

2026-04-29

format_datetime

Formats a value as date + time.

dateFormat: string

{{ system.date|format_datetime('d.m.Y H:i') }}

29.04.2026 14:30

format_datetime_database

Formats a value using database datetime format.

dateFormat: string

{{ system.date|format_datetime_database }}

2026-04-29 14:30:00

format_date_period

Formats a period value with start and end; if both are equal, only one date is returned.

dateFormat: string, delimiter: string

{{ period|format_date_period('d.m.Y', 'to') }}

29.04.2026 to 02.05.2026

format_datetime_period

Like format_date_period, but with datetime format.

dateFormat: string, delimiter: string

{{ period|format_datetime_period('d.m.Y H:i', 'to') }}

29.04.2026 08:00 to 29.04.2026 17:00

format_time

Formats a value as time only.

dateFormat: string

{{ system.date|format_time('H:i') }}

14:30

format_time_period

Formats a start/end period as time only.

dateFormat: string, delimiter: string

{{ period|format_time_period('H:i', '-') }}

08:00 - 17:00

format_department_name

Resolves and formats a department display name (expects a department-like value with id).

-

{{ system.user.role.department|format_department_name }}

Operations

format_form_field_results

Renders form field results as HTML output (supports form messages and task executions, including child task executions).

includeEmptyFields: bool, includeDescriptionFields: bool

{{ formMessage|format_form_field_results(false, false) }}

<p><strong>Field</strong>: Value</p>

format_user_address

Formats a user's address (expects a user-like value with id).

multiLine: bool

{{ system.user|format_user_address(true) }}

Main St 1\n12345 Berlin

format_user_name

Formats a user's display name (expects a user-like value with id).

showUserGroup: bool, showUsername: bool, showGroupAccount: bool, reverseFullName: bool

{{ system.user|format_user_name(true, false, false, false) }}

Max Mustermann (Operations)

format_task_status

Translates a task status value (e.g. open, done) to localized output.

-

{{ taskExecution.status|format_task_status }}

Open

p2br

Converts paragraph HTML blocks to <br>-based line breaks.

pTag: string

{{ formMessage.body|p2br('p') }}

Line 1<br>Line 2

strip_html

Removes HTML tags; supports keeping selected tags and line-break conversion options.

ignoreTags: string, p2br: bool, br2nl: bool

{{ formMessage.body|strip_html('<a><br>', true, false) }}

Hello <a href="#">link</a><br>World

Formatter Behavior

  • Unknown formatter keys are ignored at runtime and result in an empty replacement for that formatter call.

  • format_user_name, format_user_address, and format_department_name require resolvable entity IDs in the input value.

Form Field Results Blocks

format_form_field_results renders a result list and accepts optional empty-field and description-field flags. A text ContentElement embeds results using the following HTML block. A complete ContentElement payload example shows the block between ordinary text paragraphs.

Place the block at document level, outside paragraphs and inline wrappers. The block is supported in ContentElements of type text; it is not a general-purpose extension for every rich-text field.

Attribute
Type
Requirement
Description

data-source

string

Required

Source from Block Sources.

data-layout-type

string

Required

Selects the layout and presentation from Block Layout Types.

data-with-description-fields

string

Required

true includes non-input description fields.

data-with-empty-fields

string

Required

true includes empty field results.

data-with-field-descriptions

string

Optional; false

true includes help descriptions for result fields.

data-layout-type must be present, including for an empty value; omission or an unsupported source/type combination is invalid. It alone determines whether the block renders a layout or a flat result list. Boolean attributes use the literal strings true and false. The source must be available in the current rendering context. When rendering a layout, avoid referring to the layout currently being rendered, which would introduce a recursive layout reference.

Block Sources

  • formMessage - Submitted form results.

  • taskExecution - Task results, including supported child execution results.

Block Layout Types

  • "" - Flat result list from the default input layout; supported by both sources.

  • default - Input layout with its row-and-column presentation; supported by both sources.

  • formMessage - Message layout with its structure; supported only for the formMessage source.

Last updated