Skip to content

How to configure a template with placeholders

This explains how to configure a template with two placeholders. For an explanation of why you might need to use templates with placeholders, see Placeholders.

The following figure shows how an app looks when configured with the example template:

final_result

Figure: Previewing the app with the example template

The example app is configured from three templates:

list_of_templates

How the example template is configured

You create a template in the usual way and then add a Template Placeholder for each placeholder you need in the template:

Placeholder_in_element_list

There are two placeholders in this example:

template_with_2_placeholder

Figure: Template created with two placeholders

You can preview the template but there's nothing to see. You select the template to display in each placeholder when you configure the app.

In the template's App Settings, you can also set the Style of the template and add configurable options.

Configuring the example app

You create a standard app in the usual way and add the template with placeholders to it on the Designer page it looks like any other template:

Adding_Templates_to_designer

Figure: Example template after adding it to an app

However, when you add a template that contains placeholders, you are prompted to select a template for each of the placeholders. You can select any template:

Placeholders

Figure: Selecting a template for each placeholder