none
Make top icon link to top level site on all subsites RRS feed

  • Question

  • I'm trying to find a way to make the site icon on all subsites of a site collection point back to that website homepage, aka the top level site homepage. 

    So far I've tried editing the master page and surrounding the s4-titlelogo element in the three ways shown below:

    <!-- Attempt 1 -->
    <tbody>
    <tr>
    <a href="[siteURL]">
    <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>
    </a>
    <!-- This made the surrounding table white space the correct link, but not the actual icon -->
    
    <!-- Attempt 2 -->
    <tbody>
    <tr>
    <td class="s4-titlelogo">
    <a href="[siteURL]">
    <SharePoint:SPLinkButton runat="server" NavigateUrl="~site/" id="onetidProjectPropertyTitleGraphic">
    <SharePoint:SiteLogoImage name="onetidHeadbnnr0" id="onetidHeadbnnr2" logoImageUrl="/_layouts/images/siteIcon.png" runat="server" />
    </SharePoint:SPLinkButton>
    </a>
    </td>
    <!-- Seemingly no effect -->
    
    <!-- Attempt 3 -->
    <tbody>
    <tr>
    <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" href="[siteURL]"/>
    </SharePoint:SPLinkButton>
    </td>
    <!-- Seemingly no effect -->
    
    
    


    Does anyone know a way to make this happen?

     

    Thanks,

    -Phil 

    Friday, December 9, 2011 10:30 PM

Answers

  • If you change the NavigateUrl property to "~sitecollection" instead of "~site" does that give you the desired effect?
    Paul Olenick SharePoint/FAST Architect , MCTS http://olenicksharepoint.wordpress.com/
    • Proposed as answer by Stefan BauerMVP Saturday, December 10, 2011 8:41 AM
    • Marked as answer by pviii Monday, December 12, 2011 7:02 PM
    Saturday, December 10, 2011 2:43 AM

All replies

  • If you change the NavigateUrl property to "~sitecollection" instead of "~site" does that give you the desired effect?
    Paul Olenick SharePoint/FAST Architect , MCTS http://olenicksharepoint.wordpress.com/
    • Proposed as answer by Stefan BauerMVP Saturday, December 10, 2011 8:41 AM
    • Marked as answer by pviii Monday, December 12, 2011 7:02 PM
    Saturday, December 10, 2011 2:43 AM
  • Have you tried like ~SiteCollection or / instead ~Site

     

    <SharePoint:SPLinkButton runat="server" NavigateUrl="/" id="onetidProjectPropertyTitleGraphic">
    <SharePoint:SiteLogoImage name="onetidHeadbnnr0" id="onetidHeadbnnr2" logoImageUrl="/_layouts/images/siteIcon.png" runat="server" />

    or 

     

    <SharePoint:SPLinkButton runat="server" NavigateUrl="~SiteCollection" id="onetidProjectPropertyTitleGraphic">
    <SharePoint:SiteLogoImage name="onetidHeadbnnr0" id="onetidHeadbnnr2" logoImageUrl="/_layouts/images/siteIcon.png" runat="server" />
    


     

     


    Bhushan | http://www.passionatetechie.blogspot.com | http://twitter.com/BhushanGawale

    Saturday, December 10, 2011 6:22 AM
  • Hi Paul,

    That is correct!  Thanks everyone for the help!

    -Phil

    Monday, December 12, 2011 7:02 PM