2

I have used PowerShell to change the left part of the Suite Bar in Sharepoint 2013.

However, the changes are only applied to the top level site of the site collection. I assumed it would change for the entire Web Application since it is a property of the SPWebApplication object.

Is there any further action neccessary to make this change on the subsites as well?

There is only one Site Collection in the Web Application.

Code:

$webApp = Get-SPWebApplication $WebAppUrl
$webApp.SuiteBarBrandingElementHtml = 
   '<div class="ms-core-brandingText">
         Intranet
    </div>'
$webApp.Update()
  • Have you done a $webApp.Update() ? – Robert Lindgren Jul 5 '13 at 11:16
  • Yes, I forgot to include that in the question. – Gert Braspenning Jul 5 '13 at 11:31
  • I am new at this and having a little trouble. I keep getting this error message when I try to use the new master page. Sorry, something went wrong Literal content (' ') is not allowed within a 'System.Web.UI.UpdatePanelTriggerCollection' – user21079 Nov 27 '13 at 16:33
2

You can do this directly in the master page using script

If you are using the seattle master do the following:

1 - Open your site with SharePoint designer

2 - Navigate to All Files -> _catalogs -> master page

3 - Edit the Seattle.master in advanced mode and copy all the code

4 - By default it’s not possible edit the original master, to create a new one click on File -> Blank Master Page

5 - Check out the new master, edit it in advanced mode, delete all the existent code and paste the one form original Seattle

6 - Check Out New Master

7 - Search for

<div id="suiteBarRight">

8 - Right above it paste the following script

If you are using Office 365

 <script type="text/javascript">
  var companyLogo=document.getElementById("suiteBrandingBox");
  companyLogo.innerHTML = "<a href='/'><img src='/SiteAssets/BindTuningLogo.PNG' height='30px'></a>";
 </script>

If you are using SharePoint 2013

<script type='text/javascript' src='//code.jquery.com/jquery.min.js'></script>
<script type="text/javascript">
     var suitebar = $("#suiteBar");
     var branding = suitebar.find(".ms-core-brandingText");
     branding.html("<a href='/'><img src='/SiteAssets/BindTuningLogo.PNG' height='30px'></a>");
</script>

Adjust the href in the script if you want to include any particular URL, and the image url to match with your logo

9 - Save the modified master page, check it in and publish the major version

10 - Open your Sharepoint Site, go to Settings -> Site Settings -> MasterPage under Look and Feel and select the new master page for the Site master and System master options

enter image description here

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.