I am still reading Mitchel Seller’s book, Professional DotNetNuke Module Programming. It’s a great book so far, and I have already been using it as a quick desktop reference for my DNN development needs. However, I came across a page last night that confused me. I have been speaking at code camps recently about the new Skin Widgets available to DotNetNuke version 5. One of the things I show during the session is how to package a widget to be installed on another DNN website.
In the book, Mitchel describes the available manifest types being: Module, Provider, Skin, SkinObject, and Container. However, another type is Widget. That’s what we are going to talk about here. First of all, since Charles Nurse has done a great job of covering the new Manifest file, I will not go into huge detail on it, but I will show you the entire manifest file that I used for my demo.
Here are the blog posts about the DNN 5.0 manifest files that Charles Nurse put out there for background:
Following the roadmap and guidelines that Charles has left for us, we can move on to the Widget manifest file. The main difference begins with the PACKAGE node, near the top of the page. For a module, it will look like this:
<package name="WillStrohl.ContactCollector" type="Module" version="1.0.0">
A Widget is only slightly different, as shown here:
<package name="WillStrohl.Widgets" type="Widget" version="1.0.0">
Notice that the TYPE attribute differs from Module to Widget. This difference continues to the COMPONENTS child nodes. Specifically, the component node itself. There are various types that Charles has blogged about. Now we use the “Widget” value for the TYPE attribute. Then, the schema for the remaining child nodes also have a slight difference, but only in the element names themselves. However, the function is the same as you’ve been using in all previous manifest files.
<!-- It is important to identify the type as a widget for the installer -->
<!-- The name of the widget folder -->
<!-- The listing of all of the widget files included in the zip file -->
That’s all there is too it. Just replace a standard DNN 5 manifest file using my examples above, replacing the values with your own. Here is a complete example of my own manifest file.