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, ...PortalSettings.RootTab.TabID ???PortalSettings.RootTab.TabID ???
Previous
 
Next
New Post
9/24/2011 2:59 PM
 
Hello,

I would like to present unique CSS depending on the Root menu tabID.

Here is an example:
This would allow me to pull a CSS class like cssforpage75, if 75 were my page ID. Is there a way to determine the root menu ID? For example, I would like to present unique CSS for the "Company" section of our website, no matter how far down I drill into children or grandchildren of Company. Company is a root menu item. Something like:
Any ideas would be greatly appreciated. Directions to where I can find documentation on PortalSettings would be helpful as well (I've spent an hour looking). Thanks, Chris



Chris Wylie
Chief Executive Officer
www.AccordLMS.com
1775 W. State Street Suite 371, Boise ID 83702 USA
 
 
New Post
9/24/2011 3:17 PM
 
Repost:
Let me try getting the code blocked.

********
Hello,

I would like to present unique CSS depending on the Root menu tabID.

Here is an example:
<div id="skinname" class="cssforpage<%=PortalSettings.ActiveTab.TabID %>">


This would allow me to pull a CSS class like cssforpage75, if 75 were my page ID.

Is there a way to determine the root menu ID?  For example, I would like to present unique CSS for the "Company" section of our website,
no matter how far down I drill into children or grandchildren of Company.  Company is a root menu item.  Something like:

<div id="skinname" class="cssforpage<%=PortalSettings.RootTab.TabID %>">


Any ideas would be greatly appreciated.

Directions to where I can find documentation on PortalSettings would be helpful as well (I've spent an hour looking).

Thanks,
Chris



Chris Wylie
Chief Executive Officer
www.AccordLMS.com
1775 W. State Street Suite 371, Boise ID 83702 USA
 
 
New Post
9/24/2011 3:58 PM
 
I created a (free) skin object for this:
http://dnnskinextensions.codeplex.com...

Documentation here:
http://www.40fingers.net/WeblogsNews/...

If you add this to your skin (after you installed the skin object)

<fortyfingers:STYLEHELPER ID="STYLEHELPER1" AddBodyClass="True" BodyClass="[BcName] " runat="server" />

The body tag of the page will get a class like: L0_Contact, so you can address the contact page on the root level (0)

You can also set the BodyClass attribute to : "[BcId]", and you will get page id's, but IMO using the page name is better.

HTH

 
New Post
9/25/2011 12:57 PM
 
Thanks!

Is there a way to use this object to pull the Root Level Page Name?  In this example "Company", even when I have drilled down into a child tab.

Something like:
<H2><%=PortalSettings.RootTab.TabName %></H2>


Thanks,
Chris



Chris Wylie
Chief Executive Officer
www.AccordLMS.com
1775 W. State Street Suite 371, Boise ID 83702 USA
 
 
New Post
9/26/2011 2:29 AM
 
No, it only adds a class to the body element.

You could use <%=PortalSettings.ActiveTab.BreadCrumbs(0).TabName%> I think.

For more examples you can check out this example skin:
http://dnnskinextensions.codeplex.com...


 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...PortalSettings.RootTab.TabID ???PortalSettings.RootTab.TabID ???


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