Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm looking for the best approach to have a logo link in the header area redirect to different roots based on specific subsites in the same site collection.

Example: all "Radio" pages and subsites have a specific logo that links and points to the top "radio" site. But when in any "athletics" site or subsite, the logo and link would point up to the "athletics" main welcome site.

I need one master to manage all sub sites. I am not applying features. I have access to css, master and javascript. I am not a developer. Athletics, Radio, and the Main site should act like unique sites but are all housed on the same site collection.

Any help on this would be appreciated, as I can apply css "display: none" and just add different logos. I am interested to learn the right approach.

share|improve this question
add comment

2 Answers

One thing you could do is simply include all of the logos in the master page but make them hidden by default. Then you could use Javascript to look at the current URL of each page as it is loaded and find the logo that links to a URL that matches as much of the current URL as possible and make that logo visible. Naturally, jQuery would make that script a lot easier to write.

share|improve this answer
    
Thanks Dave, that is a similar approach I am looking at except was going to use alternate css turn on/off with display:none; I just don't know if that is the best approach as I will also use hiding with other header and footer content. Worried Google might flip out with display:none. –  Roger Ehmpke Mar 1 '13 at 20:01
    
You can do it that way but I would recommend against it as it requires that you manage a LOT of CSS files instead of a single Javascript file that could be included directly in the Master Page. If one of your subsites needs custom CSS then you have that much more to maintain –  Dave Wise Mar 1 '13 at 20:05
    
Thanks again Dave. I put a jQuery script together and it works. I am still unsure if people with accessibility related services and devices will be confused with the links being included when javascript is not available. The site is a college site and needs to be 508 accessible. Sorry I thought of that after I built the jquery. –  Roger Ehmpke Mar 2 '13 at 2:51
    
here is a link to my attempt: jsfiddle.net/rehmpke/GBzcS –  Roger Ehmpke Mar 2 '13 at 3:06
add comment

This is all default in SharePoint.

When using the default sharepoint masterpage (default.master in 2007, v4.master in 2010) the logo will always point to the top of the site you are on.

Let's say you have your root site which Main. Then you have 2 subsites, Athletics and Radio.

Now, if you are using the default sharepoint masterpage you will automatically be directed to the welcome page of Athletics if you are on any of Athletics sub pages when clicking the logo. This is default sharepoint behavior.

All you need to do is go to Site Settings on both Athletics and Radio and change the logo url under Title, description and logo located under Look and feel.

You don't need CSS nor javascript to accomplish any of this.

share|improve this answer
    
Daniel, I think what he is looking for is something a little different. If I understand him correctly, if he has the structure SiteA/SubSiteB/SubSiteC/ then wants the logo and url at the top of the page to point to /SiteA/ even in SubSiteB or in SubSiteC. You are correct that the logo can be manually changed in Site Settings, but the underlying link would still point to the current subsite, not the top level site –  Dave Wise Mar 4 '13 at 15:42
    
Thanks Daniel and Dave, what I have is subtly different from what you are talking about. What I have is a single site collection. I have a site with many subsites. I have an athletics site with several subsites under it. Same goes for radio and so on. I need any subsite under those main sites to have their own logo pointing up to their specific root not the main site root. I have thought of CSS to display:none and I have put together a javascript script that looks at the url indexof. The problem with both solutions is that I have to worry about screen readers and google. –  Roger Ehmpke Mar 5 '13 at 2:03
    
ex. main has two subsites: 1. Radio several subsites 2. Athletics several subsites the main, radio and athletics all have unique logos and links but any subsite under radio points to radio and any athletics subsite points to athletics. –  Roger Ehmpke Mar 5 '13 at 2:19
    
There are other items in each header and footer that will need to be hidden as well as they are not used in all sites nor are they appropriate. –  Roger Ehmpke Mar 5 '13 at 2:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.