Will "the Mighty" Strohl

Creating a DotNetNuke Skin Widget Manifest File

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.

<components> 
    <!-- It is important to identify the type as a widget for the installer --> 
    <component type="Widget"> 
        <widgetFiles> 
            <!-- The name of the widget folder --> 
            <basePath>WillStrohl</basePath> 
            <!-- The listing of all of the widget files included in the zip file --> 
            <widgetFile> 
                <name>WillStrohl.Widgets.SampleWidget.js</name> 
            </widgetFile> 
            <widgetFile> 
                <name>WillStrohl.Widgets.TechnoratiInfoWidget.js</name> 
            </widgetFile> 
            <widgetFile> 
                <name>WillStrohl.Widgets.SocialBookmarkWidget.js</name> 
            </widgetFile> 
            <widgetFile> 
                <name>license.txt</name> 
            </widgetFile> 
            <widgetFile> 
                <name>releasenotes.txt</name> 
            </widgetFile> 
            <widgetFile> 
                <path>img</path> 
                <name>i_facebook.gif</name> 
            </widgetFile> 
            <widgetFile> 
                <path>EmbedWidgetResources\InjectScript</path> 
                <name>injectscript.snippet.htm</name> 
            </widgetFile> 
        </widgetFiles> 
    </component> 
</components>

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.



blog comments powered by Disqus