How to Create a Package in Umbraco
In most open source projects in the CMS domain, add-on modules and extensions are available that are used to improve the system functionality. Umbraco package, which is a zip file, can be installed in a few clicks. The zip file contains few or all the below files:
- A package.xml file
- A package.manifest file
- Serverside code such as .dll files
- Clientside code (.css, .js and .html files, image)
A Package.xml file contains information about the version, license, datatypes used, and details of files used in this package. A sample package.xml file looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<license url="http://opensource.org/licenses/MIT">MIT License</license>
Package.Manifest file is a JSON file, containing the details about the property editors and files used in the package. A sample .manifest file looks like this:
name: "Page Comments",
In this blog, we explain the steps to create a simple package on Umbraco, to distribute and enable others to use, using Umbraco back office. These are the various steps involved:
1. Right Click on ‘Create Packages’ link from ‘Developer -> Packages -> Created packages’ as shown in the screenshot below and click on ‘Create’, enter name and click on ‘create’ button.
2. Click on the package you created in the Package Properties tab as shown below:
3. In the Package contents folder, select the Document types, templates, Data types, Dictionary items etc. as shown below, which will be automatically created when a plugin is installed.
4. In the package files tab, select the list of files or folders to be included as part of the package. These files will be included in the package and when the plugin is installed, these files are copied to appropriate paths.
5. Once all the details are entered, save the changes and publish the package by clicking the ‘Publish’ button at the top of the page.
6. The published package exists in ‘\Media\created-packages’ folder of your webinstance.
7. After creating a package, create an account on https://our.umbraco.org and upload the plugin for the community to use.
As seen above, creating a package in Umbraco is very easy and can be done quickly in a hassle-free manner. At Gaja Digital, we help our customers efficiently use Umbraco for all their content management requirements. We hope this article was useful and if you have any queries on Umbraco packages, do get in touch with us.
Manjunath Govindappa | ASP.NET Technical Lead
Shwetha Bhat | Blogger