Skip to main content

Audience targeting SharePoint Suite bar

BindTuning Team avatar
Written by BindTuning Team
Updated over 2 months ago

By default, the SharePoint suite bar is visible to all users. However, specific scenarios may require its removal or the removal of the classic ribbon bar based on user permissions or group memberships. BindTuning themes empower administrators with the ability to control the visibility of these elements as needed.

spbars.png


Modern experience

BindTuning themes provide direct controls within the settings panel to show or hide the suite bar on your Modern SharePoint site:

  1. Access your target site collection.

  2. On the ribbon, select the BindTuning Settings button.

  3. Under the General section, scroll to the bottom of the panel and locate the "Hide Ribbon" option.

  4. Navigate to the "Hide Ribbon People" setting.

settings-panel.png

You can specify individual users or SharePoint Groups for whom the suite bar should be hidden.


Classic experience

Unlike the Modern experience, Classic SharePoint sites have both the suite bar and the ribbon bar, which provide options like Share, Follow, and Edit. Hiding these elements in Classic SharePoint requires using SharePoint Designer.

suite-ribbon-bar.png

Note: SharePoint Designer is required to perform the steps outlined in this section. Click to download.

Hiding the Suite Bar

To hide the suite bar based on user permissions in Classic SharePoint:

  1. Open your site using SharePoint Designer.

  2. Edit the master page:

    • For Sandbox solutions: Navigate to All files > _catalogs > masterpages > THEMENAME.

    • For Farm solutions: Navigate to All files > _catalogs > masterpages.

  3. Check out and edit the master page you are using in advanced mode.

  4. Locate the comment ``.

  5. Immediately before this comment, paste the following line: <Sharepoint:SPSecurityTrimmedControl runat="server" Permissions="ManageWeb">

  6. Locate the comment ``.

  7. Immediately below this comment, paste the following code: </SharePoint:SPSecurityTrimmedControl>

Hiding the ribbon bar

The SPSecurityTrimmedControl used for the suite bar cannot be directly applied to the ribbon bar, as SharePoint utilizes this element for page scroll calculations. The ribbon bar must be hidden using a small script.

  1. Open your site using SharePoint Designer.

  2. Edit the master page:

    • For Sandbox solutions: Navigate to All files > _catalogs > masterpages > THEMENAME.

    • For Farm solutions: Navigate to All files > _catalogs > masterpages.

  3. Check out and edit the master page you are using in advanced mode.

  4. Locate the comment ``.

  5. Immediately below this comment, paste the appropriate script for your SharePoint version:

For Office 365, SharePoint 2019, and SharePoint 2016:

                <script type="text/javascript">
                  var suitebar = $("#suiteBarDelta");
                  if(suitebar.length<1)
                     $("#s4-ribbonrow").css('display','none');
                </script>
                

For SharePoint 2013

                    <script type="text/javascript">
                      var suitebar = $("#suiteBar");
                      if(suitebar.length<1)
                         $("#s4-ribbonrow").css('display','none');
                    </script>
                
Did this answer your question?