The purpose of this document is to provide the information to use the Widget Export/Import functionality that is part of the Widget Manager management app in the AppManager 4.0 or later releases.
Widget Export/Import allows you to easily move the information for a widget created in one project to another project.
The widget export process allows you to navigate to a particular widget definition, or set of widget instances, and export the widget to be later imported into another site or project. It facilitates this process through either a “textual” representation of the Widget Definition, or through a download .zip file which includes the Widget Definition, Widget Instances, Widget Views, and View HTML files.
Exporting Widget Definitions (ZIP)
Exporting Widget Definitions to a zip file includes all of the definition, view HTML and instances that exist for the widget. It is the most common and fully featured way to export.
First, login to Akumina AppManager and navigate to Widget Manager management app. Select a widget to export by clicking “Edit” on the widget definition. You should now see the “EXPORT WIDGET” option on the toolbar:
Click “EXPORT WIDGET” and a modal will appear
To download the widget to .zip, click “DOWNLOAD” on the modal
The widget will download to a zip file on your local machine with the widget name:
Please extract the zip file, and ensure you have the following structures:
Views Definition and View HTML:
Exporting the Widget JS for Custom Widget Definitions
Exporting Widget Definitions (Copy to Clipboard)
Instead of exporting to zip you can copy to clipboard and then import that directly into the system. Please note that this does not export the VIEW HTML files.
On the Export Widget dialog, click “Copy to Clipboard”
Then on your local clipboard you should be able to paste into word document or text document to verify and save the definition that will then be used in the import process.
Exporting Widget Instances (Zip)
When exporting one or more widget instances of a widget definition, the exported file contains everything the widget definition export would contain plus all the instance information such as the values assigned to the properties, the selected view, etc. for each instance. In this way, if you have a configuration of a widget instance that you want to replicate on another site you can easily do so.
To export a widget instance, navigate to the instances of a Widget by clicking on “View Instances”
Next, select the instance(s) you would like to export by clicking on the checkbox next to each instance. Then click on “EXPORT SELECTED WIDGET INSTANCES”
Open up the downloaded zip file, and then check the instances > instances.json file in a text editor to validate that only your selected instances were downloaded.
Importing widget definitions are supported both through the zip file import as well as through the “textual” representation of the widget download/export. It is recommended to use the import of zip file to get the fully featured support of View HTML files.
To import a widget, navigate to the Widget Manager and click “+ IMPORT WIDGET”
The import widget page will be displayed
To import a Widget Definition or Widget Instances zip file, click “Choose File” and then click on IMPORT ZIP.
- If there is an existing widget definition that matches the one in the import file, it will update that widget definition, views, and html.
- If there is no matching definition, it will create a new definition with all the supporting fields and properties from the export.
- Optionally you can choose to rename the widget upon import, although if the widget class does not change, it will still update the existing widget.
If instead of importing a zip file you want to manually import the widget definition from the clipboard data that you saved during export, you have the option of pasting in the widget export JSON text.
In the Import Widget page, click on the “IMPORT WIDGET MANUALLY” button. This will open the modal window with a text area in which you can paste the data you copied from the Clipboard during the export process. Clicking “OK” will create the definition, instances, and views but will not include the Views HTML upload as the zip does.
The Akumina Widget Store (Preview)
The Akumina Widget Store is being previewed as part of the AppManager 4.0 release. The Widget Store provides a repository for new widget functionality to be easily imported into your Widget Manager.
To access the store, simply click on the “WIDGET STORE” button in the Widget Manager.
The Widget Store lists the available widgets along with a one-button “Install” to simplify the process of adding them to your project. It even shows you the widgets you have already installed.
New widgets from Akumina, our partners and clients will be added to the store regularly by Akumina!