Skip to main content

Hand craft a marketplace package

To hand craft a package you will need to create a package.xml file and a cms-content.xml file. The package.xml file contains all the details about your files that will get deployed directly to the live site. The cms-content.xml file will contain a list of all the content inside of your files that will be available from inside the CMS. 

Package structure

A package can have the following folders and XML files. Not all of these files/folders are required and a package can have any combination of them, this is purely for informational purposes.

A folder for cms-content should be used to store all content that will be available from within the CMS, images, templates, JavaScript files and stylesheets.

cms-content.xml file contains a list of all of the folders and files inside of your cms-content folder (explained below).

The file and the folder mentioned above should be created by following the instructions to create a package and then downloading and unzipping the package.

deployed folder is there to store all of the files that will be deployed directly to the published site. This can be razor views or anything else that you want to sit on the published site but not be editable from within the CMS. A deployed/bin folder is used to store any DLL's you want to be sent to the published site. This is automagically mapped to YourPackageName.YourDLLName.dll inside of the main bin folder. A deployed/razor folder is used to store the razor views and a deployed/images  folder is used to deploy any images you do not want to be editable from the CMS.

structured-content folder is used to define structured content types to be used within the CMS. For example you can define a structured form that will be rendered in place of the editor just like other structured content types.

package.xml file defines the package, its description, version and any other settings required to set against it. This is also where you specify any razor views to be included in the package itself. Take a look at the example below:

As you can see here the file has a root package node which has attributes of IDnameversion and displayName. This sets out the basic information for your package that will be displayed to users when viewing your package page on the Marketplace.


We then have a controls node which is used to tell the Marketplace where our razor views are stored within the deployed folder. We can also tell the Marketplace that the razor view has X properties, and we can set them here just like we can within the razor view itself. Here is a sample of two controls, one razor view and one server control.


The file has a settings node which lets us set any amount of settings for the package that users can then set against it when installed on their environment. These settings are stored in the main ContensisSettings.config  file and can be found in a YourPackageName.YourSettingName  format, in case you can't find YourSettingName  in the settings file.

The format used for the cms-content.xml file is a little bit different. We have a root node called root, which contains a set of configuration values. You can also include templates and relationship types in this file as well.

Next you will see that you can specify folders with content inside of each by having a folder node, with a children node which lists all the files inside the folder and the location of the file itself. We recommend you copy the code from above and tweak to your own needs as required.