Friday, November 22, 2013

How to hide the Ribbon in SharePoint 2010


Hiding the ribbon to any user that can't delete items

1.       Navigate to the master page of the site that you wish to hide the ribbon of.

2.       Right click on the maserpage in SharePoint Designer and select Edit File in Advanced Mode

3.       Using Code view or split view, locate the <SharePoint:SPRibbon

4.       Insert before <SharePoint:SPRibbon. In this example, insert on line 61

<Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="DeleteListItems">




5.        Navigate to the closing of the SharePoint Ribbon </SharePoint:SPRibbon>

6.       Insert </SharePoint:SPSecurityTrimmedControl>. In this example, it is line 27





7.       This will hide the ribbon to anyone that does not have the permissions to delete items.

See this MSDN article for a list of PermissionsString options: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spbasepermissions.aspx
 

No comments:

Post a Comment