DotNetNuke Skins and Resources by ThinkofDesign

 

The Styles Skin Object 

DotNetNuke version 04.09.00 introduced a new skin object that give us the ability to attach even more StyleSheets to our pages. The new skin object's name is "Styles" and its purpose is to allow skinners attach browser specific stylesheets.

The code as we can find it in the new default skin:

<dnn:STYLES runat="server" ID="StylesIE6" Name="IE6Minus" StyleSheet="ie6skin.css" Condition="LT IE 7" UseSkinPath="true" />

Of course it has to be registered first.

<%@ Register TagPrefix="dnn" TagName="STYLES" Src="~/Admin/Skins/Styles.ascx" %>

And here is the description of its attributes as we can read in the /Admin/Skins/Styles.xml

Condition

Internet Explorer specific condition. All valid conditional expressions are allowed, for example "LT IE 7", "gte IE 7" or "(IE 6)|(IE 7)". See MS MSDN Library for more information.

IsFirst

Boolean value that defines whether the stylesheet link should be loaded as first link or not. If false, the link will be added as last.

Name

String value that will define the ID of the stylesheet link

StyleSheet

String value that contains the path to the style sheet that needs to be loaded. The path is relative to the root of the application.

UseSkinPath

Boolean value that, if set to true, will make the reference to the Stylesheet relative to the path of the skin.

Cambrian tastes really good, don't you think?

Further resources



Comments


Name (required)

Email (required)

Website

Enter the code shown above: