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, ...Can skins share common code?Can skins share common code?
Previous
 
Next
New Post
6/7/2010 7:07 AM
 
This may be a stupid question, but can skins share common chunks of code? For example, I have about 10 different skins which are 95% the same - it's just maybe an extra pane or a stylesheet change or something else small on each one that changes, the footer, header, menu and other large chunks are the same in all skins.

Whenever I make a change to a common area (For example, the CopyRight date on the footer) I have to change 10 skins and upload them all - is their a way of defining an .ascx common file and importing them in each skin to make this easier (sorry, I am not a skinning dude ;)

Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
6/7/2010 7:26 AM
 

Rodney,

From a CSS point of view the skin.css file contains the common code shared between all skins in a pack, and the skinname.css files are specific to each of the skins their associted with (ie a skin called yellow would use the skin.css and the yellow.css file).

I'm not too sure about a common.ascx file though like they use in Wordpress where you define the layout for the header, footer and so on which gets included in a main template file.

Hope this helps from a css point of view though,

Rick.



PSDtoDNN - You supply the artwork... we'll build the skins!™
Website | Twitter | YouTube | Skype
 
New Post
6/7/2010 7:54 AM
 
You can use includes, which can be added to several skins.

<!--#include file="includes/header.ascx"-->

Please note you must use a sub folder or DNN will see the ascx as a skin!

"Normally" you use the .inc extension for includes, but if you use .ascx, you get better syntax highlighting while editing (in VS).
 
New Post
6/7/2010 11:54 AM
 
Rodney,

Maybe because I am I developer I look as your issue a bit differently.  Have you considered having a common skin definition that is read by a code generator that then generates the 10 different versions?

Code Generators typically generate VB and C#, but are not limited to the specific languages.  You should be able to create the skin files (aspx, xml, htm, css) using the code generator.  There are many code generators out there so you use one of them or create something yourself.   For example MyGeneration ( must be good they use DNN for their site <grin>)

This method keeps the "control" in your hands and does not require DNN support.

Just a thought
Paul.
 
New Post
6/7/2010 2:52 PM
 
Thanks Rick and Timo - that is what I was looking for!

@Paul:  That is a cool idea  ((I actually use MyGeneration and EntitySpaces in my League module on PokerDIY) but I had the skins outsourced so was given all the different versions - I just noticed a lot of common HTML in all of them that could be extracted - I guess I could look at pumping them out automatically (just need time to investigate ;)

Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Can skins share common code?Can skins share common code?


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