Links

Jinja: (Custom) variables, wildcards and functions

Jinja2, one of the world's most popular data rendering engines, is used as a templating language to render individual information. Many core functions are available. Some are not available for security reasons. A list of the core external functions can be found under:

Custom Locoia variables

All custom Locoia variables, wildcards, and functions can be found here.

Additional details

For some functions there're additional details to consider.

regex_replace

In order to capture groups with this function \g<name> needs to be used with named groups and \g<number> with plain groups.

Noteworthy core Jinja functions

selectattr

  • Usage: {% for record in list_reference | selectattr(field_reference, 'match', 'comparison_value') %}
  • Use case: This let's you filter any (nested) list directly in Jinja by specific attributes