Affiliate Program

You Are Here: Support  |  Discussion Board Saturday, July 31, 2010

Forum Minimize
 
  Forum  Discussions  Skins  What changed for DNN 5.1 skinning?
Disabled Previous
 
Next Next
New Post 12/3/2009 9:18 PM
  anonymous
0 posts
No Ranking


What changed for DNN 5.1 skinning? 

Please note that this is targeted at DNN 5.1, not 5.0 (which is slightly different)!

Here are the main changes:

1. A skin is an extension
The special status of skins has changed; a skin is an extension now, just like anything you install to extend DNN.
This has a lot of advantages;
A. We can use one installer for all extensions
(people will have to get used to this, but in the end it will make installing extensions easier)
B. DNN 5 Skins can have a version number.
C. Skins can include a license text, release notes and the author is visible in the admin interface of DNN.
D. You can create packages that install multiple extensions. This means you can package a skin object with a skin. If a skin needs a specific skin object you had to instruct the user to download and install it separately in DNN 4, they can now be installed from one package.
 
This means a DNN 5 skin needs manifest file, listing all the files in the package, a DNN 5 skin is not a simple zip file anymore. You can still install legacy skins in DNN 5, read more further below.
 
2. jQuery is included with DNN 5.0.0
There are two ways to get the page to load the jQuery framework.
1.  Create a simple module to register the jQuery request and place it on the page.  Read this blog post  by Joe Brinkman, which shows the necessary code to register the request.
2.  Turn on the Widget framework which requires jQuery and will automatically register the jQuery request.
(Menu: Admin > Site Settings > apearence > [v] Enable skin widgets)
 
3. Widgets
These are client side script blocks that can be installed as an extensions and used in skins or modules
Examples: take a look at the Minimal Extropy (the text size buttons) and the Extropy skin.
 
4. Use Object tags to add skin objects in HTML skins
In DNN 4 skin objects are include in an HTML skin using [TOKENS] and the Skin.xml file.
Since editing XML files is an extra step and you cannot see what attributes are set for a skin object in the HTML source a new way to add skin objects to an HTML skin is included in DNN 5.

The idea is really simple, you use an object tag to include a skin object in an HTML skin and the object tags parameters to set the attributes.
This is a much cleaner and easier solution since HTML developers are using them a lot already.

An example "skin object" inclusion be like this:
<object id="dnnLOGIN" codetype="dotnetnuke/server" codebase="LOGIN">
    <param name="Text" value="Please Login Here" />
</object>


As you can see the object tag itself needs a codetype="dotnetnuke/server" attribute so the skin parser knows it is a skin object.
The codebase="LOGIN" attribute will determine what skin object this is, here you use the same string you would use for [Token] inclusion of skin objects (the name of the skin object).

The attributes of the skinobject are set though a <param name="Text" value="Please Login Here" /> node inside the object tag.
It is simply the attributes name and it's value, add one parameter tag for each attribute.

Please note that bot methods [TOKENS] and <object> tags will reault in an ASCX file after parsing.

There are two important things to remember:
1. This <object> tag skin object inclusion is only supported in DNN 5, a skin using it will not install in DNN 4.
2. The "old" way of adding a [skinobject] using an XML file is still supported.
This would be the best way if your skins should work in both DNN 4 and DNN 5

More Examples: Minimal Extropy skin (the default DNN 5 skin).

 
5. TEXT skin object
You can add localized text to the skin, and also use token replace in the text you add.
Example: Minimal Extropy skin. 
 
6. You can set the default fallback doctype.
Sets the fallback "Skin Doctype" for webpages. This is used if the Skin does not define the DocType.
This means you can force DNN to use the XHTML doctype, even if the skin does not define the doctype
Menu: Host > Host Settings > Host Details > Fallback Skin Doctype.
 
All these will be explained further and illustrated with examples, later.
For now I will focus on the main subject, "using legacy skins in DNN 5" and "Converting a legacy skins to a DNN 5 skin"
 
Disabled Previous
 
Next Next
  Forum  Discussions  Skins  What changed for DNN 5.1 skinning?
Copyright 2010 by DNNCovered.com      |     Privacy Statement     |     Terms Of Use