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, ...add a class to body tagadd a class to body tag
Previous
 
Next
New Post
7/9/2010 1:15 AM
 
I'm adapting a set of existing template into dnn skin, and i find in html files, body tags are given certain classes which are defined in css so pages can have different layout.

I learned that notnetnuke will ignore everything else except inner html within body tag. and the head and body are defined in default.aspx. I'd like ask is there any way to add class to body tag in the skin file? or any way can override default.aspx?

Thanks in advance!
Simon
 
New Post
7/9/2010 4:38 AM
 

Simon,

Welcome to the DNN forums :)

Regarding the adding of CSS to the body element, as far as I know you can't control this from a skinning point of view, but there is an alternative which gives you the same level of control.

Have a read of this blog post: http://www.thinkofdesign.com/blog/83/... it will show you how to add a dynamic css element based on the page id.

What you need to do is create a wrapping element in the .ascx file and use the following code to generate the unique ID: id="page<%=PortalSettings.ActiveTab.TabID %>"

As stated above this needs to go in the .ascx file, so if you're working with html, css and xml skins, you'll need to upload the skin pack so it gets parsed, and then locate the generated .ascx file in the skin folder.

Hope this helps,

Rick.



PSDtoDNN - You supply the artwork... we'll build the skins!™
Website | Twitter | YouTube | Skype
 
New Post
7/18/2011 7:24 AM
 
Why would you leave out access to a fundamental piece of markup from this process? I think it should be pointed out from the very start very poorly concieved the support for CSS & mark-up is in DNN.
 
New Post
7/18/2011 3:05 PM
 
you can use this extension to do what you want: http://bit.ly/iN8l8I
It was made to overcome this limitation
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...add a class to body tagadd a class to body tag


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