Export as a template

The Web AppBuilder (Developer Edition) enables you to easily create web app templates for your local server or for your portal by exporting the 2D or 3D app. Your custom template must be hosted locally.

Export the template

  1. Open the app in edit mode, regardless of whether the app is in builder or template-based configuration, click the Saved drop-down arrow and click Export As Template.
  2. In the left pane of the Set Configurable Parameters window, choose the parameters you want users to be able to customize—for example, a logo—and click the Plus Sign Add parameter icon next to the parameter. The logo parameter is added in the right pane of the window.
    Set Configurable Parameters window

    Configurable parameters, such as title and subtitle, are added by default; therefore, there is no Add parameter icon associated with them.

  3. Expand other parameters, for example widgetPool, to add more configurable parameters.
    Choose parameters

    For more information about configurable parameters, see Add configurable parameters to templates.

    Currently, the template exported from Web AppBuilder only supports Paragraph, String, Boolean, Number, and Options field types.

  4. Click Save to save the configurable parameters in the app.

    The saved configurable parameters reload the next time the Set Configurable Parameters window opens. They are persisted in the app config file.

  5. Click Export and click Export to My Organization or Export to Local Server.
    • To export the template to your organization, click Export to My Organization, provide the template information with the title, tags, and description in the Export as Web App Template window, and click OK.
      1. Depending on whether you have permission to share your exported template to the template group specified in your organization, you may get an export message.
        • If you do have permission to share the template, the message is as follows:
          Message with permission to share the template
        • If you don't have permission to share the template, the message is as follows:
          Message without permission to share the template
      2. Click OK. In either case, your template will be added as an item in My Content. Browse to My Content to see your custom template.
        Note:

        Export As Template will not only create a template as an app item under your account, but will also try to share it with the Web App Templates group specified in your organization. If you do not have permission to share the item with the specified group, a warning message displays.

      3. Since the template has been exported successfully, click Cancel to close the Set Configurable Parameters window.
      4. Share the item to the group being used for the templates if you want to use the configurable template in your organization's web template gallery or group template gallery. The administrator of your organization can then configure the map viewer or configure groups to use the group that includes your template.
      5. Publish a map with your template.
        Note:

        See Create apps from maps for details.

      Note:

      In this scenario, the app from which the template is exported is hosted locally. However, the template itself is hosted by Portal for ArcGIS or ArcGIS Online. The app created by publishing a map with the template is hosted by Portal for ArcGIS or ArcGIS Online as well.

    • To export the template to a local server, click Export to Local Server, provide the template information with title, description, and a thumbnail in the Export as Web App Template window, and click OK. If the template is created successfully, click the logo to return to the home page. The new template is listed in the template table.

Update the template exported to my organization

Since a specific app is only associated with a specific template, update the template accordingly when the app changes. With Web AppBuilder (Developer Edition), although the template can be hosted by Portal for ArcGIS or ArcGIS Online, the app from which the template is exported is always hosted locally.

  1. Select the app associated with the template in the Apps table and click Edit to open the app.
  2. Click Export as Template to open the Set Configurable Parameters window.

    If you previously exported a template, the Update button appears instead of the Export button.

  3. Change the parameters as necessary.
  4. Click Update.

    The Update Web App Template message appears informing you of the update status.

    Update message

  5. Click OK to close the message.
  6. Click Cancel to close the window.
  7. Publish a map with your updated template.

Update the template exported to local server

To update a template exported to a local server, see Edit or preview template.