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, ...Different pics in the header depending on the section of the site...Different pics in the header depending on the section of the site...
Previous
 
Next
New Post
8/20/2007 1:21 AM
 

Hi all,

What I need to do is have some code that changes an image in the top header (building a custom skin) depending on which section of the site is selected (i.e. the 'top-level' entries from the tree-menu).

I am a VB6/ASP and VB.NET/ASP.NET programmer, but DNN is confusing the c**p out of me!

Sorry if my problem is either trivial or confusing, please feel free to ask more questions, etc. I just cannot work out where to start with selecting the image-source for this problem.

Cheers,

Sam.

 

 
New Post
8/21/2007 11:03 PM
 

DotNetNuke Modules from Snapsis.com
 
New Post
8/22/2007 2:18 AM
 
Thanks John, that was *almost* exactly what I needed!

The PortalSettings.ActiveTab.TabName property is very useful, but is there any way of getting only the top-level tabs? i.e. If i click on a tab from the menu, it works perfectly, but if i click on anothe page inside that tab, i want it to stay on the first one...

I am thinking something along the lines of checking if PortalSettings.ActiveTab.ParentId = -1 and if not, getting the tabname from the parentid... but I don't know how!

How would I go about accessing a tab by tabID, and then getting that tab's TabName? i.e. logic of: Tab(PortalSettings.ActiveTab.ParentId).TabName... or something!

Cheers,

Sam.
 
New Post
8/22/2007 9:06 PM
 

Never mind, solved my own problem! Used the breadcrumbs collection and explicitly specified the first (0) item in the array. Works perfectly!


Dim objTab As DotNetNuke.Entities.Tabs.TabInfo = CType(PortalSettings.ActiveTab.BreadCrumbs(0), DotNetNuke.Entities.Tabs.TabInfo)
imgPagePic.ImageUrl = SkinPath & Replace(objTab.TabName, " ", "") & ".gif"
 
 
 
New Post
8/23/2007 1:50 PM
 

Hi Samon,

I'm glad you figured it out.

There are more useful tricks like that at the following link:

http://www.snapsis.com/DNN-Tips-And-Tricks/tabid/560/forumid/12/postid/5003/view/topic/DotNetNuke-Tokens--Some-tricks-for-getting.aspx


DotNetNuke Modules from Snapsis.com
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Different pics in the header depending on the section of the site...Different pics in the header depending on the section of the site...


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