SHAREPOINT 2013 – HIDE NEWSFEED, SKYDRIVE, SITES (DELTASUITELINKS)

With the Introduction of new UI in SharePoint 2013, a new Suite bar has been added that displays “NewsFeed, SkyDrive, Sites” links. These links are called “DeltaSuiteLinks or Suite links“.The Url and the Text for the links in the suite bar are per-defined and there is no Out-of-Box way to Change them. You can however Override “SuiteLinksDelegate” Delegate Control and Customize\Add\Remove links of your own.

If you want to Hide or Disable them, you can look at various CSS options available. Lets look at each option with example.

Option 1 - Remove the Control from Master Page.  Open your Master page in SharePoint 2013 Designer and look for “SuiteLinksDelegate” delegate control.

In master page you would look for something like below -

<SharePoint:DelegateControl id=”ID_SuiteLinksDelegate” ControlId=”SuiteLinksDelegate” runat=”server” />

Simply Remove this or Comment it out to hide the links in the blue bar.

Option 2 - Using JavaScript to to hide the links Control. For this example we are just adding the JavaScript required to a Source Editor on a page. You can add this to your master page or to a delegate control to add it to all the pages in the site. To hide “NewsFeed, SkyDrive, Sites…” links add the below code to Edit source on a page.

Steps -

1. Edit the page and click on Insert tab.

2. click on Embed Code to add the below Javascript

JavaScript -

<script language=”javascript”>

_spBodyOnLoadFunctionNames.push(“HideBrandingsuite”);

function HideBrandingsuite()

{  

document.getElementById(‘ctl00_DeltaSuiteLinks’).style.visibility = ‘hidden’;

}

</script>

For more CSS tricks see SharePoint 2013 Top links(NewsFeed, SkyDrive, Sites..) – Name, ID and How to Hide them

Option 3 - You can disable them at a Web application level. Use the following Powershell script to do this.

Powershell

$wa = Get-SPWebApplication

# This can be an empty string

$wa.SuiteBarBrandingElementHtml = ” ”

#Save your change

$wa.Update()

Option 4 -  Another way to Customize or hide these links is by Creating a Visual Studio Solution for Overriding SuiteLinksDelegate Delegate Control. See a Step-by-Step Tutorial at Add,Remove Links in Top Suite Bar (SKYDRIVE,SITES,NEWSFEED) in SharePoint 2013

<script language="javascript">   
    _spBodyOnLoadFunctionNames.push("FunctionName");   
    function FunctionName()   
    { 
document.getElementById('suiteLinksBox').style.visibility='hidden';
    }   
</script>

More:

http://www.tuyrcorp.com/sharepoint-2013-top-links-name-id-and-how-to-hide-them/

原文地址:https://www.cnblogs.com/zyip/p/3001694.html