Data
You can choose how the retrieved data is passed into the Dynamic Text Panel.
Every row
means that the Content template is applied to every retrieved row.All rows
, the query results are passed entirely as thedata
field to the template.
To work with the query results as a whole, you can use #each builtin helper to iterate over the records.
Every row
If your data source returns the following four columns of data.
| app | description | cluster | tier |
| ---- | ---------------------------- | ------- | -------- |
| auth | Handles user authentication. | prod | frontend |
Template
Display it using the following template for each row.
# {{app}}
> {{description}}
{{#if (eq tier "frontend")}}
Link: <a href="https://{{cluster}}.example.com/{{app}}">https://{{cluster}}.example.com/{{app}}</a>
{{/if}}

Render a single template (All rows)
For the following query result.
title | author | year |
---|---|---|
Dune | Frank Herbert | 1965 |
1984 | George Orwell | 1949 |
Template
Given that All Rows is selected, the following template renders a table from the query result.
| Title | Author | Year |
| ----- | ------ | ---- |
{{#each data}}
| {{title}} | {{author}} | {{year}} |
{{/each}}
