Export the add-on

The add-on consists of structure and content of different Sitefinity CMS modules. After you develop an add-on that you want to distribute, you must export it from your Sitefinity CMS. You export only the part that you want to distribute. For example, a module, some pages, page templates.

Perform the following:

  1. Open the Sitefinity CMS instance from which you want to create an add-on package.
  2. Navigate to Administration » Export / Import.
  3. In the left pane, select Export for add-on.
  4. You can choose whether you want to export existing Sitefinity CMS structure and content or custom code. 
    Select one on the following:
    • Modules supported for export
      Select this option, if you want to export existing modules from Sitefinity CMS. 
      For more information about available content, see Modules supported for export.

      NOTE: For all of the modules, including static and dynamic, you can choose to export only their structure, that is the module itself, together with its configurations, or you can choose to export both the module and all of its content items.

      IMPORTANT: When selecting to export a module or pages, make sure you include all of its dependent types. For more information, see Dependency of exported items.

    • Blank NuGet template for add-on
      Select this option, if you want to create an add-on that does not contain any structure or content exported from Sitefinity CMS, but only custom code, such as custom widgets or custom modules. 
  5. Enter the name of the folder that you want to export your add-on.
    Each add-on is exported in a separate folder under ~\App_Data\Sitefinity\Export.
    The folder name will be also the Add-on's name and its ID.
  6. Click Export.
    A progress bar appears, indicating the state of the export.
    After the export completes, a success message appears.
    If there are errors during the export, an error message will be displayed. For example, when the system does not have access to the export folder.

    NOTE: If you click Back to Export, you can go back and export another add-on form the Export screen

RESULT: Sitefinity CMS creates a separate folder for your add-on. Inside the folder, the add-on contains the following files:
  • One separate folder for all exported elements.
    For example, each module is in its own folder, the page templates are in a separate folder.
  • Install and uninstall PowerShell scripts
    Install.ps1 and Uninstall.ps1 scripts are used to transfer the exported structure and content in the proper directories. This is necessary for the packaging and installation of the NuGet package.

IMPORTANT: Do not modify the PowerShell scripts.

  • One .nuspec file that you use to create the NuGet package.
    A .nuspec file is an XML file that describes a package.
  • Was this article helpful?

    Next article

    Edit the .nuspec file