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, ...How can I load a body style for the home and an another body style for the other pages?How can I load a body style for the home and an another body style for the other pages?
Previous
 
Next
New Post
7/23/2010 3:45 AM
 
Hi,
I have a website with a different home-page from other pages:
in the home-page I have this: <body class="front">
and in the other pages I have: <body class="not-front">

In my DNN skin I have solved this issue with the javascript.
In the home-page (HOME.ascx) I have write this code:

      document.body.onLoad = setClassStyleBody();
      function setClassStyleBody() {
            document.body.className = 'front';
      }

and in the other pages (PAGES.ascx) I heve write:


      document.body.onLoad = setClassStyleBody();
      function setClassStyleBody() {
            document.body.className = 'front';
      }

This work well but I don't think that is the best way...
How can I load a body style for the home and an another body style for the other pages?
How can I solve this problem without using the javascript?

I hope there is an answer! :-)
Thank you!
 
New Post
7/23/2010 3:57 AM
 
you may simply apply a different skin to the home page than to other pages and use body id tag to identify page body vs. other body tags, e.g. in rich text editor.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
7/23/2010 7:15 AM
 
Thanks for your quick reply!
In my home-skin and pages-skin there isn't body tag, head tag or meta tag. In the home/page-skin I have only the body content.
I have the body tag only in the Default.aspx of the root directory.
With you reply you mean that I must use a DNN special tag that set the body style?

Really thank you!
 
New Post
7/23/2010 12:52 PM
 

Hi,

When you're creating the skins you can use 2 css files:

skin.css - This should contain all the general styles that are shared amongst all the skins in the pack,

and

skinname.css - which should hold the skin specific css.

Knowing this you could setup the specific body css within each of the skinname.css files rather than having to add in any additional code.

Hope this pointer helps.

Regards,

Rick.



PSDtoDNN - You supply the artwork... we'll build the skins!™
Website | Twitter | YouTube | Skype
 
New Post
7/23/2010 5:00 PM
 
I need to set the body style class dinamically because I have a very big css file style within many statements and sub statements like this:

body.front #Col1 { ... }
body.front #Col2 div.BoxContent ul.ElInfo { ... }
...
body.not-front #Col1 { ... }
body.not-front #Col2 div.BoxContent ul.ElInfo { ... }
...

To split the css code customized for each skin page will take me much time (and I have no time)... But I think that is the solution right for me...
If I'll have an idea I will post it!
Thanks to all!!!
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...How can I load a body style for the home and an another body style for the other pages?How can I load a body style for the home and an another body style for the other pages?


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