Jinja Templating

We use Jinja to render case information on ADX documents. This documentation will only explain a very very basic concept of Jinja. Please head to the offical Jinja documentation for details.

Using Jinja Instructions

Jinja instructions can be added to ADX documents anywhere. They start with {{ and end with }} and use a Python like syntax. E.g. this displays the result of 5 + 6:

<adx>
  <body>
    <text>{{5 + 6}}</text>
  </body>
</adx>

Displaying Case Information

To display case information per matched instance you have a special variable available in the jinja template. Take for example a document with a condition e is Entity. Now when this document is rendered a variable e will be available in the template and give you access to information and meta information about the matched instance, for example you can display the legal status enum information and the title in a field:

<adx>
  <body>
    <field title="{{e.information_title('legal_status')}}">
      {{e.translate('legal_status')}}
    </field>
  </body>
</adx>

All options are described in Instance Wrapper.

Last updated