Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Including base for a colored skin.Including base for a colored skin.
Previous
 
Next
New Post
5/28/2010 5:03 PM
 
Greetings. I am new in DNN and MS based web-development. So i guess my problem is solved quite simple.

I have several colored versions of site design. They all have the same layout and differs only in backgrounds and images paths. So i want them all to just redefine some base skin css, taking from it all base makeup and base css.

So i created the following files:

/Portals/_default/Skins/Base/base.ascx - layout
/Portals/_default/Skins/Base/base.css - layour related styles

/Portals/_default/Skins/%colorHere%/skin.ascx - entry point
/Portals/_default/Skins/%colorHere%/skin.css - color related styles


base.ascx contains all makeup, @Registers, link for a base.css file etc. While skin.css should only contain link for it's own skin.css and base.ascx inclusion.

Skin.ascx file contents:
----------------------------------------------------------------------------------------------------
<%@ Control Language="vb" CodeBehind="~/admin/Skins/skin.vb" AutoEventWireup="false"
Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" %>
<%@ Register TagPrefix="inc" TagName="a" Src="\Portals\_default\Skins\Base\base.ascx" %>

<style type='text/css'>
@import '<%= SkinPath %>/skin.css';
</style>

<inc:a runat="server"/>
----------------------------------------------------------------------------------------------------


base.ascx file contents:
----------------------------------------------------------------------------------------------------
<%@ Control Language="vb" CodeBehind="~/admin/Skins/skin.vb" AutoEventWireup="false"
Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" %>
<%@ Register TagPrefix="dnn" TagName="LOGO" Src="~/Admin/Skins/Logo.ascx" %>
[.... lots of registers here....]

<style type='text/css'>
@import '/Portals/_default/Skins/Base/base.css';
</style>

[.... lots of makup here .....]
----------------------------------------------------------------------------------------------------


When i'm trying to apply a color skin i'm getting NullReferenceException.
I need to have SkinPath variable available at both base.ascx and skin.ascx.
 
New Post
5/30/2010 2:53 PM
 

Jared,

Welcome to the DNN forums, and thanks for your post.

This is achievable through the regular method of skinning by using the following CSS files in your skin pack.

skin.css - This should be used for all the shared elements of the design, this included the base div elements and any non-colour specific info.

skinname.css (where skinname is the name of the skin) - This should be used for skin specific css, which in your case would be the colour changes.

When DNN loads the skins of your skin pack they will each share the skin.css file and load only their relative skinname.css files.

Regards,

Rick.



PSDtoDNN - You supply the artwork... we'll build the skins!™
Website | Twitter | YouTube | Skype
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Including base for a colored skin.Including base for a colored skin.


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out