6

I often get requests to have the link of the home logo on a subsite link to the home page of the root site collection?

I can't see any native way of doing this with the SharePoint navigation but might be missing something?

3 Answers 3

2

You would be looking at customizing the masterpage to accomplish this.

In 2010 (You didn't have a version specified though 2007 / WSS should be similar) you can update the following lines to behave how you would like, or more specifically you could set the NavigateUrl of the SPLinkButton to whatever you want it to be if you only wanted to change the page that clicking the image navigates to.

<td class="s4-titlelogo">
    <SharePoint:SPLinkButton runat="server" NavigateUrl="~site/" id="onetidProjectPropertyTitleGraphic">
        <SharePoint:SiteLogoImage name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="/_layouts/images/siteIcon.png" runat="server"/>
    </SharePoint:SPLinkButton>
</td>
2
  • Thanks for this - was just what I was after. Yes SharePoint 2010 but I do need to do it on another site which was a SharePoint 2007 sitecollection I migrated into a 2010 farm.
    – pigeon
    Jan 25, 2012 at 3:58
  • This only works for the current site, not all its sub-sites, correct? I am trying to have sub-sites inherit the 'link to home through my custom logo' property, but I cannot do it. The only way I imagine this could work is immediately after creating a new sub-site edit its default.master and v4.master files. can this be more simple? Thanks. Radu.
    – user9784
    Jul 31, 2012 at 18:48
6

As tylerr07 said you'll need to edit the master page, however you'll need to use the ~sitecollection token to get to the root site of the site collection. eg: NavigateUrl="~sitecollection"

<SharePoint:SPLinkButton runat="server" NavigateUrl="~sitecollection" id="onetidProjectPropertyTitleGraphic">
    <SharePoint:SiteLogoImage name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="/_layouts/images/siteIcon.png" runat="server"/>
</SharePoint:SPLinkButton>
4
  • +1 - didn't know about the token. Thanks for sharing! Jan 25, 2012 at 4:37
  • I Gavin, I did try this, but found the links were setup like this /site/~sitecollection; I currently have the line in the master page setup like this: <SharePoint:SPLinkButton runat="server" NavigateUrl="/" id="onetidProjectPropertyTitleGraphic"> and apparently the View All Site content link on the subsites is broken and showing a file not found error. However this could also be related to a change of the AAM's for the site but I haven't seen changing AAMs do anything like that.
    – pigeon
    Jan 27, 2012 at 23:43
  • the ~sitecollection token will evaluate to / or /sites/site1 etc.
    – GavinB
    Jan 31, 2012 at 0:34
  • 2
    I was just working with this today and I found a slight error in your example above. The exact token should be "~sitecollection/" - I found that without the "/" it didn't work as expected. Oct 8, 2012 at 14:18
0

For site collection redirect option, Add the attribute NavigateUrl to this tag and set it value to "~sitecollection" For site current site redirect option, Add the attribute NavigateUrl to this tag and set it value to "~site"

NavigateUrl="~sitecollection/"
NavigateUrl="~site/"

Click Here See More Details

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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