4

The whole day yesterday I have been trying to follow the instructions from MSDN to hide the top links in a SharePoint team site (SharePoint Online in Office 365).

However, I can not get it to work. The links are still present. I am no expert at this, and I have tried inserting the javascript at different places in the master-file. Also it seems the master-file does not have an ID named DeltaSuiteLinks, but it does have one named suiteLinksBox. I have tried changing this in the javascript, but no success.

Also, when copying the master-file to edit the copy, I do not get an html-file associated with it. There is only a new master-file, which I try to edit and then set as custom and default.

Can anyone please give me a detailed description on how I can remove the links?

  • did you try this, this is for team site not for publishing: learningsharepoint.com/2013/04/29/… – Waqas Sarwar MVP May 3 '14 at 8:00
  • Yes I tried this. I found the <SharePoint:DelegateControl id=”ID_SuiteLinksDelegate” ControlId=”SuiteLinksDelegate” runat=”server” /> and removed it, but the links are still there. – Kerry May 3 '14 at 8:53
  • That script from MSDN should do the trick, make sure you publish your master page. You can also hide it using CSS, #suiteLinksBox { display: none;} To hide individual links use corresponding anchor ids such as #Suite_MainLink_ShellMail, #Suite_MainLink_ShellCalendar, #Suite_MainLink_ShellPeople – Aveenav May 3 '14 at 14:04
  • I have published it as a new major version, but it does not remove the links. Can you tell me where I should place the javascript, and if that is what I am doing wrong? i have tried both before the closing head tag and before the closing body tag, but none of those work. – Kerry May 3 '14 at 15:21
3

As @Jesus already mentioned in his answer, Microsoft silently shuffled things around a little bit on Office 365 SharePoint Online.

So far, I've come across a change how the online help is embedded (by changing seattle.master).

The second change, which you also discovered already, is a change on the suitebar delegate control, which is a hidden feature so we cannot simply turn it off on our own.

To hide all the links on the top right ("Yammer", "OneDrive", "Sites" and "..."), you could simply use the following CSS snippet:

<style type="text/css">
.o365cs-nav-O365LinksContainer
{
  display: none;
}
</style>

To hide the "Yammer" link, use:

<style type="text/css">
#O365_MainLink_ShellYammer
{
  display: none;
}
</style>

To hide the "OneDrive" link, use:

<style type="text/css">
#O365_MainLink_ShellDocuments
{
  display: none;
}
</style>

To hide the "Sites" link, use:

<style type="text/css">
#O365_MainLink_ShellSites
{
  display: none;
}
</style>

and to hide the "...", use:

<style type="text/css">
#O365_MainLink_Apps
{
  display: none;
}
</style>

Simply embedding those lines into your MasterPage should do the trick.

2

Microsoft has recently made some change to O365. I can not verify if this was a change but there is no ID for DeltaSuitBar on the rendered page. There is a class you could use "ms-core-deltaSuiteLinks" as well as an ID of "suiteLinksBox" that will also work for applying a hidden style too.

You can try this by opening the console window of your browser (F12 for chrome and IE) and pasting in the below code. Your navigation will be hidden after you run it.

document.getElementById('suiteLinksBox').style.visibility = 'hidden';
1

If you want to remove OneDrive for Business, Yammer/Newsfeed, and/or Sites from the top nav bar throughout the tenant, MS has recently added the ability to turn off via the SharePoint > settings menu > "Top Navigation Bar User Experience" section at top.

0
add-pssnapin microsoft.sharepoint.powershell

$text = "Central Administration Server"
$template = "<div class='ms-core-brandingText'>$text</div><style>#suiteLinksBox {display:none}</style>"
$wa = Get-SPWebApplication "http://sps2013.sharepoint.local:20000"
$wa.SuiteBarBrandingElementHtml = $template
$wa.Update()
-1
  1. Open below link in primary WFE server

    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\1033\STYLES\Themable\COREV15.CSS
    
  2. Add below style at the end and save

    #suiteLinksBox {display:none}
    
  • 1
    You should not modify the out of the box style sheets like this, it is not a best practice and will lead to your updates getting overwritten on patching and similar activities.. – Robert Lindgren Aug 1 '15 at 7:33

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.