Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

PortalWebHosting
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
 


  Sponsors  

Meet Our Sponsors

Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
The best choice for your web site host, email hosting, and domain registration.
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Make it Hot! ( ...  Setting a dynamic class on the body element?
Previous Previous
 
Next Next
New Post 3/11/2008 3:39 PM
User is offline syrupcore
2 posts
10th Ranked


Setting a dynamic class on the body element? 

Hi,

New to DNN. Wondering if there is a way to add a class to the body element depending on the url or some other sitemapish means? For instance, I'd like all pages within the product section to have a body class of "products" and product foo to have an additional class of product-foo so it'd look like < body class="products product-foo" We do this sorta stuff with other .NET frameworks and Content Management Systems regularly but I'm too green with DNN to have a clue!

 

Thanks for any help!

Will

 
New Post 3/12/2008 1:03 AM
User is offline Timo Breumelhof
1693 posts
5th Ranked




Re: Setting a dynamic class on the body element? 

Add a div to your skin with this class (or look for the body tag using code in the Skins code behind, but a div is earier):

<div class="<%=CType(PortalSettings.ActiveTab.BreadCrumbs(0), DotNetNuke.Entities.Tabs.TabInfo).TabName%>">

 

<div>


Timo Breumelhof -- www.searchdotnetnuke.com -- Extended DNN (forum) search
 
New Post 3/12/2008 9:50 AM
User is offline syrupcore
2 posts
10th Ranked


Re: Setting a dynamic class on the body element? 

Thanks!  I will give it a go.

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Make it Hot! ( ...  Setting a dynamic class on the body element?
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DotNetNuke Training by Engage Software
Specializing in customized training, architecture and module solutions for large scale implementations lead by DNN Core Team Member Christopher Hammond.
engagesoftware.com
Smart-Thinker
DNN Modules for Social Networks for as low as $69 for 6 modules! We also maintain the DotNetNuke Directory - http://DNNDir.com
www.smart-thinker.com
DNN Photo Gallery
Complete Photo Gallery Management!
www.dnnPhotoGallery.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP