3

we are looking at branding our SharePoint 2013 site.

What is the way to clear out all the stuff on top right corner like NewsFeed, skydrive, share, follow?

Is it possible via designer/VS? I have changed the top left text via powershell.. Can the top right things can be cleared off using delegate controls or CSS or commenting off something in master page?

Ideally I would prefer something like a VS feature (module).

UPDATE:

Here is the answer with 3 possible solutions:- http://www.learningsharepoint.com/2012/08/09/sharepoint-2013-hide-newsfeed-skydrive-sites-deltasuitelinks/

Option 1 - Remove or Hide the Delegate 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 or Comment it out.

Option 2 - Using JavaScript to to hide the links Control.

<script language=”javascript”>
_spBodyOnLoadFunctionNames.push(“HideBrandingsuite”);
function HideBrandingsuite()
{  
document.getElementById(‘ctl00_DeltaSuiteLinks’).style.visibility = ‘hidden’;
}
</script>

Option 3 - Creating a Visual Studio Solution for Overriding SuiteLinksDelegate Delegate Control.

  • You can get a start here: zimmergren.net/technical/… (SuiteLinksDelegate) – Robert Lindgren Mar 10 '14 at 12:25
  • Hi Robert, what about using security trimming to achieve this? is it possible? – variable Apr 1 '14 at 5:09
  • Security trimming would be up to your delegate to handle (you sure as h*ll can not do it in the js,CSS approach so you would have to use the code behind of your delegate) – Robert Lindgren Apr 1 '14 at 5:16
  • I did not get your point can you explain please – variable Apr 1 '14 at 5:24
  • 1
    I mean that we can enclose the div (top right box) in a SharePoint:SecurityTrimmedControl and decide who can see it. Thats what I am referring to.... – variable Apr 1 '14 at 6:25
5

Based on Zimmergren's blogpost regarding new delegate controls in SP 2013:

Create a module with the following in the Elements file

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

  <!-- DelegateControl reference to the SuiteLinksDelegate Delegate Control -->
  <Control ControlSrc="/_controltemplates/15/Zimmergren.DelegateControls/SuiteLinksDelegate.ascx"
           Id="SuiteLinksDelegate"
           Sequence="1" />

</Elements>

(Of course replace controlsrc to point to an ASCX in your solution.) You will have to play a bit with the Sequence ID to make sure your control overwrites the existing one (increase or decrease the number)

In the code behind of that ASCX you can put the following:

public partial class SuiteLinksDelegate : MySuiteLinksUserControl
{
    protected override void Render(HtmlTextWriter writer)
    {
        base.Render(writer); // Should render nothing
    }
}

Edit, for basic CSS

You can also hide it with CSS, by using the following selector

#suiteLinksBox {
    display:none;
}
  • Hi Robert, can you post the CSS method, if possible, as well. (something that can be done via designer and css or setting visible to false...) – variable Mar 11 '14 at 7:25
  • Appended my answer with a css selector for the lazy ;) – Robert Lindgren Mar 11 '14 at 7:30
  • what about updating masterpage with following. This can be done via SPDesigner as well as VS2013 module project. What is your view on this?:- <SharePoint:SPSharePromotedActionButton runat="server" Visible="false"/> <SharePoint:DelegateControl runat="server" ControlId="PromotedActions" AllowMultipleControls="true" Visible="false"/> <SharePoint:SPSyncPromotedActionButton runat="server" Visible="false"/> <SharePoint:PageStateActionButton id="PageStateActionButton" runat="server" Visible="false" /> <span id="fullscreenmodebox" class="ms-qatbutton" style="visibility:hidden"> – variable Mar 11 '14 at 7:32
  • The promoted actions is another delegate control, not the same – Robert Lindgren Mar 11 '14 at 7:33
  • I have used the foll. code:- <SharePoint:AjaxDelta runat="server" id="DeltaSuiteLinks" BlockElement="true" CssClass="ms-core-deltaSuiteLinks" Visible="false"> This method can be used via editing the masterpage as well as by creting module project in VS2013. What is your view on this? – variable Mar 11 '14 at 7:35

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.