0

I have requirement to change the logo and hide Global navigation from One page of SharePoint 2013 environment.

have any one tried it before!

3

You could add a Script Editor webpart to the page with the following snippets:

<style type="text/css">
    .ms-breadcrumb-top {
        display: none;
    }
</style>

and

<script type="text/javascript">
    $(document).ready(function () {
        $('.ms-siteicon-img').attr('src', '<your logo url>');
    });
</script>

You can use #DeltaTopNavigation or #sideNavBox instead of .ms-breadcrumb-top.

If you have not jQuery on the page, you can add the cdn script link at the top of the snippet webpart content:

<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>

UPDATE: As @Danny '365CSI' Engelman suggested, a solution without jQuery may be:

<script type="text/javascript">

    function changeLogo() {
        document.querySelector('.ms-siteicon-img').setAttribute('src‌​', '<your logo url>');
    }

    ExecuteOrDelayUntilScriptLoaded(function () {
        _spBodyOnLoadFunctionNames.push(changeLogo);
    }, "sp.js");

</script>
  • Note: the no-jQuery-needed; I can do it with vanilla JavaScript way is: document.querySelector('.ms-siteicon-img').setAttribute('src', '<your logo url>'); .... but ... it requires less typing – Danny '365CSI' Engelman Dec 28 '16 at 16:12

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.