How To: Export as a Template from Web AppBuilder and configure the template for use in ArcGIS Online or Portal for ArcGIS
Application templates can be created and exported from Web AppBuilder, and then shared with a custom template group for use in future applications. This functionality allows continuity between applications made in an organization, and is convenient if the same set of widgets are used in multiple applications.
The first step is to make sure that Portal for ArcGIS/ArcGIS Online is configured with a custom Configurable Apps group. For the templates exported from Web AppBuilder to be available to end-users, they must be shared with the Configurable Apps group specified in the Portal for ArcGIS/ArcGIS Online organization settings. There is a Default group set for this, but it is not possible to share new templates with the Default group. Therefore, a custom group must be specified.
Create custom template group and set it as the application templates group
- Create a group:
- Check the Status option that says Organization (Users within your organization can search for and find this group)
- Navigate to My Organization > Edit Settings > Map > Configurable Apps. In the drop-down, select the group created in Step 1.
- For end users to also have the option to use the default templates, check the box that says Share the Esri default configurable apps to this group when you click Save.
- Click Save on the upper left of the page
Create a template from a Web AppBuildler application and share it with the group
- Create a Web AppBuilder application, either from an existing web map or from My Content > Create > App > Using the Web AppBuilder
Note: It is useful to name this application in a way that indicates that it is associated with the specific template you are creating, because updating the template requires updating the original application (see below for details). This particularly applies when planning to make multiple custom templates. Only one template can be exported per app, so make sure to keep track of the applications underlying the templates.
- Choose the theme for the template and add/configure any widgets.
- On the lower right of the configuration panel, click Save, and click the up arrow and select Export as Template.
- This opens the Set Configurable Parameters dialog box. Choose which parameters that end-users can change when they make new applications based off the template. Select a parameter to be configured by clicking the button next to it with the plus sign. The title and subtitle are configurable by default.
Each widget is slightly different, so some trial and error may be required to get the configuration as desired.
- Click Save.
- Click Export. At the prompt, name the template. As previously discussed, it is useful to name this in a way that indicates it is associated with the web application.
- Click OK.
This shares the template with the group created and configured in the first section of this article. The template gets stored in the My Content of the user that is logged in when the template is exported, and is listed as a Web Mapping Application.
Note: If Portal for ArcGIS or ArcGIS Online is configured with the default configurable apps group, the following message is received: "Exported successfully! However, it seems that you don't have the permissions to share the template item to the template group specified in your organization. You need to manually add it to the group once it is accessible." If this happens, create and configure a custom template group, then share the template with it.
Only one template can be exported per Web AppBuilder application. If it becomes necessary to update the template, changes must be made to the in the original application, not the exported template. This is why it is useful to have a naming convention that associates each application with the exported template.
- Edit the application the template was exported from.
- After making the changes, hover over Save > Export as Template.
- Set configurable parameters as needed
- Click Update.
Using custom templates
Once the template is created and shared, there is the option to use the custom template when creating an application from a template.