2

I have created a main site and I have created many subsite under the main site.

When I am in any main page and click on the logo icon, the page redirects to the home page.

But, when I am in any subsite and click on the logo icon, the page redirects to the subsite homepage rather than the main hompage.

I have edited on master page but no effect... enter image description here

4

Download your masterpage and edit it. Find the following block of code (it might be somewhat different):

<div id="siteIcon" class="ms-tableCell ms-verticalAlignTop">
    <SharePoint:AjaxDelta id="DeltaSiteLogo" BlockElement="true" runat="server">
        <SharePoint:SPSimpleSiteLink CssClass="ms-siteicon-a" runat="server" id="onetidProjectPropertyTitleGraphic" >
            <SharePoint:SiteLogoImage CssClass="ms-siteicon-img" name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="/_layouts/15/images/siteIcon.png?rev=42" runat="server"/>
        </SharePoint:SPSimpleSiteLink>
    </SharePoint:AjaxDelta>
</div>

Replace SPSimpleSiteLink Tags Such that:

<div id="siteIcon" class="ms-tableCell ms-verticalAlignTop">   </div>
    <SharePoint:AjaxDelta id="DeltaSiteLogo" BlockElement="true" runat="server">
        <SharePoint:SPLinkButton runat="server" NavigateUrl="~sitecollection/" id="onetidProjectPropertyTitleGraphic">
            <SharePoint:SiteLogoImage CssClass="ms-siteicon-img" name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="/_layouts/15/images/siteIcon.png?rev=42" runat="server"/>
        </SharePoint:SPLinkButton>
    </SharePoint:AjaxDelta>

NavigateUrl attribute is the link you want your logo to point to

EDIT: Updated the code

| improve this answer | |
  • Still its not working... I changed the code in master page in SPD.... still there is no change.... Is their any other solution? – user51380 Feb 19 '16 at 9:04
  • Can you share the code you changed? – Dhruv Jain Feb 19 '16 at 9:16
  • <div id="siteIcon" class="ms-tableCell ms-verticalAlignTop"> <SharePoint:AjaxDelta id="DeltaSiteLogo" BlockElement="true" runat="server"> <SharePoint:SPLinkButton runat="server" NavigateUrl=""~sitecollection/"" id="onetidProjectPropertyTitleGraphic"> <SharePoint:SiteLogoImage CssClass="ms-siteicon-img" name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="/_layouts/15/images/siteIcon.png?rev=42" runat="server"/> </SharePoint:SPLinkButton> </SharePoint:AjaxDelta> </div> – user51380 Feb 19 '16 at 9:21
  • NavigateUrl=""~sitecollection/"" --> Change to single quotes – Dhruv Jain Feb 19 '16 at 9:30
  • 1
    Have you checked in & published that master page in SPD? – Hardik Feb 19 '16 at 10:53
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/"
| improve this answer | |
0

In javascript :

Using SP Chrome editor, upload a file in style library and script link to this js. Edit the JS and add :

window.onload = function(){
Var urlLogo = "/sites/xx/xx/xx";
    document.getElementById("ctl00_onetidProjectPropertyTitleGraphic").href = urlLogo;
}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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