Domain Widgets

Follow

Domain Widgets use Portal’s Custom Widget engine to render JavaScript scripts configured by domain administrators to be used as normal widgets by users on the domain. When a Domain Widget is published on the domain, it will appear in the ‘Add Widget’ wizard with an accompanying name and description.  Domain Widgets are only available for domain administrators and whitelabel owners.  

How they work

When a user adds a Domain Widget to their dashboard, the widget loads the Javascript code directly from the Portals domain widget database where the code is stored. The size, selected data sources and refresh rate are saved in the user’s dashboard configuration, and when the dashboard renders it combines the Domain Widget code and user’s configuration to display the widget.

Because the Domain Widget code is loaded directly from a central database, any updates that are made to the Domain Widget by the admins are automatically reflected on all widgets of that type throughout the domain. Unlike Custom Widgets, Domain Widgets will render the same way for the dashboard owner, portal managers, private viewers or public viewers. As it is added by the domain admin, it is considered ‘safe’ and warning messages to anyone but the owner are disabled.

More information about how the Custom Widget works can be found on the Custom Widget documentation page.

Examples for Custom Widget scripts can be found on the Custom Widget Github page.

Setting up a Domain Widget

Domain Widgets can be created and managed on the ‘Domain Widget’ page in the subdomain admin interface, found on the left menu under 'Domain Setup'. 

There are three fields which can be configured when creating or editing a Domain Widget.

Domain Widget Block

  • Name : Displays as the ‘Widget Type’ when a user is creating a new widget or is viewing the widget’s edit page. Required field.
  • Description : The ‘Description’ when a user is creating a new widget. Optional.
  • Code : The Javascript code that will be run when a user views the domain widget.

After a Domain Widget has been created, it will need to be ‘Published’ in order for a user to be able to select it from the add widget process on their dashboard. Domain Widgets that have already been added to a dashboard will continue to function properly if it has been ‘Unpublished’. If the Domain Widget has been deleted, the user’s widget will not work anymore.

Add Widget Dropdown

Have more questions? Submit a request

Comments