Skip to main content


Useful snippets that you can use in your templates.

Markdown list from variable

{{#each (variable "hostname")}}

- {{this}}


Conditional content

{{#if app "auth"}}
This is the auth app.

Render HTML from data

If you'd like to render HTML returned by the data source, you need to use three-brace expressions, {{{htmlValue}}}, otherwise Handlebars escapes the HTML content.


where htmlValue is


Dynamic templates using dashboard variables

Use the lookup helper function to create dynamic templates based on dashboard variables.

The following template creates a key-value pair from every selected value in the myvar dashboard variable.

{{#each (variable "props")}}
{{this}}: {{lookup @root this}}

Render a single template

For the following query result:

DuneFrank Herbert1965
1984George Orwell1949

Given that the Every Row switch is turned off, the following template renders a table from the query result:

| Title | Author | Year |
| ----- | ------ | ---- |

{{#each data}}
| {{title}} | {{author}} | {{year}} |