Skip to main content

Recipes

Useful snippets that you can use in your templates.

Initial context

Display the Initial context with which the template was executed.

```json
{{{json @root}}}
```

Take a look at the Documentation for Handlebar variables.

Iterate through all fields in each record

All Rows should be selected in the Panel options.

{{#each data}}
{{#each this}} {{@key}}: {{this}} {{/each}}
{{/each}}

Conditional content

{{#if (eq app "auth")}}
This is the auth app.
{{else}}
This is not an auth app.
{{/if}}

Specific row in the data

To address a specific row in the returned data, select All Rows option.

{{data.4.title}}

Handlebars variables

{{#each data}}
{{#if (eq @index 3)}}
{{title}}
{{/if}}
{{/each}}