A TEMPLATE component allows defining templates that can be used in the view pages (general or by thing definition). Into the component definition, within the Templates page, you can manage the of templates provided by the component.
To edit a template, you should:
Add a new template in the Templates page of the component definition.
A template require to specify:
The Name that will be used in the Console to reference the template within the pages.
We suggest you use a speaking name that allows you to understand what the template is for and to whom it is addressed (e.g. customer_overview).The Label displayed in the template selection pages.
Select the context the template is working on:
- ANY means the template will be available in the General template list.
- THING means the template will be available in the Thing Definition template list.Save the component, and enable it on the development environment.
Go to your development environment.
Locate the template in the template list (General or by Thing Definition).
Press on the 3-dots icons, and select Override.
By using the template visual editor, you can edit your template and test it directly in the DPS.
When you finish editing the template, enter the template editor code view, select the entire HTML code and copy it.
Go back to the template component and open the template you are creating.
In the HTML area paste the template source code and save the component.
In the Preview Image, you can upload an image used as preview in the Console.
In the Console you can restore the template to the original provided by the component.
In case you have created a DRAFT, promote it to a version and make it available to your environments.