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, ...Divide one skin into re-usable parts (e.g. header + body + footer)?Divide one skin into re-usable parts (e.g. header + body + footer)?
Previous
 
Next
New Post
3/11/2009 5:10 AM
 

I created one Skin with 7 variations where each variation uses a different column/pane layout, e.g.: contentpane with small right pane, contentpane with small left pane, contentpane with small left and right pane, etc. As the header (menu, logo, overall design) and footer (imprint, terms, copyright etc.) stay the same if course, I would like to organize these parts in external file, because otherwise (for even small changes like adding a different seperator between imprint and copyright) I would have to make the same change to 7 different files.

With the CSS this works pretty fine; for example I have a default.structure.header.css, default.structure.footer.css and default.DNN.menu.css which every skin-variation-[no].css loads with import. So if I have to make a small change to the menubar, or position the logo a little bit different, I only have to apply this change to one central CSS file - instead of editing every CSS file for each skin variation.

Anyways, I still could not figure out yet how to break up my HTML files like that. Does anyone how to do that?

 
New Post
3/12/2009 10:02 AM
 

In theory...you create a user control "sharedheader.ascx" and "sharedfooter.ascx" (names are for illustration, they can be anything) and then you put the common content into the respective files. THen, in the skins, you register the new user controls: <%@ Register TagPrefix="uc" TagName="SharedHeader" Src="SharedHeader.ascx" %> <%@ Register TagPrefix="uc" TagName="SharedFooter" Src="SharedFooter.ascx" %> in each skin and then replace the duplicate code with: Y OU have to make sure that any user controls or tokens that are referenced in the sharedfiles are referenced in those files at the top. For example, <%@ Control Language="vb" AutoEventWireUp="false" Explicit="True" Inherits="System.Web.UI.UserControl" %> <%@ Register TagPrefix="dnn" TagName="LOGIN" Src="~/Admin/Skins/Login.ascx" %> And then you could have the login control in this elements code. HOWEVER, in practice this has been a little more difficult. I couldn't remove all the user controls and place them in the shared file. The menu calls (HouseMenu in my case, but also the SolPartMenu object, had to be referenced in the skin, they threw an undefined error otherwise. Also, i had used a variable SkinPath to dynamically load some style sheets in after the page was built and suddenly this variable was undefined when called in the sharedheader, but was fine when called form the skin. Strange. Anyways, a couple hacks later and all seems to be working fine. Hope that leads you in the right direction. Note: Beginning DotNetNuke Skinning & Design has really helped out with a lot of these issues. worth getting

 
New Post
3/12/2009 3:12 PM
 

I use old fashined includes for that..

    <!--#include file="includes/headertext.inc"-->

 
New Post
3/12/2009 10:56 PM
 

Thank you both for your advises.

Timo, I tried to do it with the SSI as you recommended. But while the HTML itself works, the SkinObjects are not parsed, so I will get a Skin with correct header and footer, but with [TOKENS] instead of parsed SkinObjects.

 
New Post
3/13/2009 5:41 AM
 

You are right, that will only work in an ASCX skin, not in an HTML skin, but it's the same for the other solution I think.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Divide one skin into re-usable parts (e.g. header + body + footer)?Divide one skin into re-usable parts (e.g. header + body + footer)?


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