





















































Like a module, skins must be packaged and deployed to your DNN server. Once deployed, they will appear on the Skins page under the Admin menu for preview and applying to the portal.
In previous article, we saw how to create new skins directly on a test DNN portal. This allows you to edit the files and immediately see the results just by refreshing your browser. But once a skin has been fully developed, this recipe will show you how to package your skin into a portable ZIP file using the package wizard.
Once created, you can install the skin package on the DNN site by logging in as SuperUser then uploading the ZIP file and installing the skin package as an extension. The skin is installed in the Portals_defaultSkins folder.
As of DNN 5.x, only the SuperUser can deploy skins. This was done as a security precaution as skins can now contain user-written code.
For this recipe you will need skin files to deploy. We will use the skin files from the previous article, from the recipe: Creating a simple ASCX skin.
(Move the mouse over the image to enlarge.)
In this recipe we will expand the sample ASCX skin and demonstrate additional Skin Objects you can use.
To follow along with this recipe you must have completed the following recipe:
Here is a diagram of the new page layout we will create:
<%@ Register TagPrefix="dnn" TagName="BREADCRUMB"
Src="~/Admin/Skins/BreadCrumb.ascx" %>
<%@ Register TagPrefix="dnn" TagName="TEXT"
Src="~/Admin/Skins/Text.ascx" %>
<%@ Register TagPrefix="dnn" TagName="LINKS"
Src="~/Admin/Skins/Links.ascx" %>
<%@ Register TagPrefix="dnn" TagName="COPYRIGHT"
Src="~/Admin/Skins/Copyright.ascx" %>
<%@ Register TagPrefix="dnn" TagName="CURRENTDATE"
Src="~/Admin/Skins/CurrentDate.ascx" %>
<%--By placing the SkinObjects inside a parent DIV they share the
same style--%>
<div class="bread_bg">
<div id="bread_style">
<dnn:TEXT runat="server" id="dnnTEXT"
CssClass="breadcrumb_text" Text="You are here"
ResourceKey="Breadcrumb" />
<span>
<dnn:BREADCRUMB runat="server" id="dnnBREADCRUMB"
CssClass="Breadcrumb"
RootLevel="0" Separator=" > " />
</span>
</div>
<div id="login_style" class="user">
<dnn:USER runat="server" id="dnnUSER" CssClass="user" />
|
<dnn:LOGIN runat="server" id="dnnLOGIN" CssClass="user" />
</div>
</div>
<div class="bot_bg links">
<dnn:LINKS runat="server" id="dnnLINKS" CssClass="links"
Level="Root" Separator=" |
" />
</div>
<div class="bot_pad">
<div id="copy_style" class="footer">
<dnn:COPYRIGHT runat="server" id="dnnCOPYRIGHT"
Align CssClass="footer" />
</div>
<div id="date_style" class="footer">
<dnn:CURRENTDATE runat="server" id="dnnCURRENTDATE"
Align CssClass="footer" />
</div>
</div>
Separating the Copyright and Date into separate DIVs allow us to put one in the lower-left corner and one in the lower-right corner of the page.
/*breadcrumbs*/
.Breadcrumb, a.Breadcrumb:link, a.Breadcrumb:active,
a.Breadcrumb:visited {color: #800000; font-size: 13px;}
a.Breadcrumb:hover {color: #C00;}
.bread_bg {background-color: #EAEAEA; fontfamily:
Verdana, Arial, Helvetica, sans-serif; border-left: solid
1px #EAEAEA; border-right: solid 1px #EAEAEA; margin: 0 5px 0 5px;
height: 30px;}
#bread_style {float: left; padding: 10px 0px
0px 17px; color: #000000; font-size: 13px;}
/* for the bottom of the page */
.bot_bg {background-color: #EAEAEA;
border-left: solid 1px #EAEAEA;border-right: solid 1px #EAEAEA;
border-bottom: solid 1px #EAEAEA; padding: 10px; margin: 0 5px 0
5px;}
.bot_pad {font-family: Verdana, Arial,
Helvetica, sans-serif; margin-bottom: 20px; padding: 0 30px 0
20px;}
#terms_style {float: left;}
#copy_style {float: left;}
#date_style {float: right; padding: 0px 0px 0px
10px; }
/*links*/
.links {text-align: center;}
.links, a.links:link, a.links:active, a.links:visited {fontweight:
bold; color: #800000; font-size: 11px;}
a.links:hover {color: #C00;}
/* Sets the font size and text color of the footer at the bottom
of the page */
.footer, a.footer:link, a.footer:active, a.footer:visited {color:
#800000; font-size: 12px;}
a.footer:hover {color: #C00;}
If you're curious to see which Skin Objects are available on your DNN site, you can log in as the SuperUser and select Extensions under the Host menu. This will list all the skin objects and their version number.
Some skin objects may not be installed by default and will not appear in this list until installed.