Managing Widget Templates¶
Widget templates are standardized, reusable units that can be applied to both Dashboards and Single-Page Applications. By saving a configured widget as a template, you can achieve efficient widget reuse and cross-page synchronous updates. This significantly boosts the efficiency of building and maintaining multi-page dashboards and applications.
This document describes how to manage widget templates in Template Center and how to use and synchronize them.
Prerequisites¶
Ensure you have had the permissions for the group. Viewing, editing, and using widget templates, as well as managing folders within a group, all require the group permissions. For more information, see Managing Groups. To apply for permissions, please contact the group administrator.
Accessing Widget Template List¶
On the right side of DTV Center, enter Template Center.
Switch to the Widget Templates tab.
Left Navigation Pane: Displays the list of groups and folders that you have permission to access. Widget templates are strictly isolated by group permissions; you can only see groups for which you possess the required permissions.
Right Content Area: After selecting a group and a folder on the left, the right side will display all widget templates within that folder as cards. You can categorize and manage your widget templates by clicking New Folder.
Creating and Saving Widget Templates¶
Widget templates cannot be created from scratch directly within the Template Center. Instead, they are converted from existing widgets inside the actual editing interface of a Dashboard or a Single-Page Application.
Open the editing interface of any Dashboard or Single-Page Application.
Select a widget that you have already configured (both charts and containers are supported).
In the … dropdown menu at the top-left corner of the widget, select Save as Template.
Configure the following basic information in the pop-up window:
Belonged Group: Select the group where you have the appropriate permissions to save the template.
Folder Name: Select an existing folder within the group, or select + Add from the dropdown list to create a new folder.
Template Name: Enter a name for the widget template (supports internationalization).
Tag (Optional): Add tags to the widget template for easier filtering and searching. Select an existing tag within the group, or select + Add from the dropdown list to create a new tag.
Once saved successfully, the widget will appear as an independent template in the Template Center > Widget Templates list.
Managing Widget Templates¶
In the Template Center > Widget Templates tab, hover your mouse over a widget template card to perform the following management operations.
Modifying Basic Configurations¶
Click the Configuration
icon on the widget template card to perform the following operations:
Edit Basic Template Information: Select Setting from the dropdown menu, and edit the template’s name, tags, and visibility scope in the pop-up window.
View Template Impact Scope: Select Setting from the dropdown menu, go to the Template Impact Range tab in the pop-up window, and view the pages associated with this template.
Move Template: Select Move from the dropdown menu to move the widget template to another folder within the same group, or move it across groups (requires editing permissions for the target group).
Delete Template: Select Delete from the dropdown menu to permanently delete the widget template. Note that deleting a template does not automatically delete the widgets already referenced in pages; however, those widgets will lose their link to the template and can no longer be synchronously updated.
Updating Associated Pages¶
When the content, style, or data configuration of a widget template changes, you need to push these changes to all pages bound to this template.
Click the Configuration
icon on the widget template card, and select Update Associated Pages.The pop-up lists all dashboard pages and single-page application pages in the current system that reference this widget template.
Select the pages you want to synchronize, and click OK. The system will automatically overwrite and apply the latest configuration of the widget template to the corresponding widgets on the selected pages in bulk.
Using Widget Templates¶
The core value of widget templates lies in “configure once, reuse anywhere”. You can use widget templates in both the Dashboard editing interface and the Single-Page Application editing interface in the following ways:
Adding Widgets Based on Templates¶
Enter the editing interface of a dashboard or a single-page application.
In the widget addition pop-up window, select the Widget Template tab.
Browse the templates you have permission to access, and select the target widget template.
Upon adding, the system will prompt you to choose whether to Follow Updates with Template:
Follow: The widget establishes a strong binding with the template. Once the widget template is modified and the “Update Associated Pages” operation is executed, the current widget’s content will automatically apply the changes and update synchronously.
Not Follow: The widget only copies the current configuration of the template and exists as a completely independent widget. Any subsequent modifications to the template will not affect this widget.
Unbinding from a Template¶
When a widget on a page is set to Follow a widget template, but you need to make personalized adjustments (such as modifying styles or custom configurations) to that widget in a specific business scenario, you need to unbind it from the template first.
In the page editing interface, select the widget bound to the template.
At this time, a prompt will appear at the top of the right-hand widget configuration panel: “This widget is bound to the ‘XXX’ widget template. To customize the widget configuration, please unbind the widget template first.”
Click the Unbind button below the prompt.
Once unbound, the widget will revert to an independent widget, allowing you to freely edit all its configurations. The unbound widget will completely lose its linkage with the original widget template, and future template updates will not affect this widget.