Link to home
Start Free TrialLog in
Avatar of polaris101
polaris101

asked on

Hiding the Ribbon in SharePoint 2010

Hi Experts -

I'm more on the Administration side rather than the development side of SharePoint and need some assistance.

I'm trying to hide the ribbon for certain ASPX pages of a site.  I've tried a web part that someone developed, but you can only apply to a site and not an individual page.  I'm sure it can be done through custom html/css somehow, but I'm not quite sure how.  I have tried to add the following, but it completely chops off the top inch of the screen where the ribbon would appear if in context.  We have navigation links in that area so that solution isn't an option.

#s4-ribbonrow
{
 display: none;
}

This option requires Visual Studio, but I'm not too familiar:
http://blogs.msdn.com/b/sharepointdev/archive/2012/04/30/how-to-hide-the-ribbon-in-sharepoint-2010-rajeswari-mohandas.aspx

I've seen some other options by Googling, but it seems like I'd need some development expertise.

Any other tips or suggestions?  Could any developers step me through what I might need to do?  Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of colly92002
colly92002
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of polaris101
polaris101

ASKER

colly92002, very nice blog post.    You say that DeleteListItems will only hide the ribbon for users who do not have delete permission, since I would only like to make the ribbon visible for Administrators what permissionstring would I use?
colly92002,  Can you assist in applying this solution on an individual ASPX page?  I'd rather not touch the master page since I will only be applying this on a few select pages.  Thanks again.
If you want to apply this to users with certain permissions sets then the best practice way is to modify the master page.

This is not as scary as it sounds!  You can easily take a copy of the masterpage (again this is the best practice), edit that, and apply it ONLY to the pages in SharePoint you want it to (and so keeping the default masterpage linked to all the other pages).

Why should you do this in the masterpage?  Because ASPX page lifecycles and Sharepoint interaction can get very complicated, so you really don't want to get involved in that if you can help it (I've been there...).  Editing the masterpage gives you all the nice Sharepoint add-ons such as security trimming (allowing you to enable/disable features based on Sharepoint security priveledges). You can do it all from one free tool (SharePoint Designer), and you can do everything you need to do to hide the ribbon in one place :)

Here is a nice blog telling you specifically how to copy and edit the masterpage:
http://plexhosted.com/billing/knowledgebase/237/How-to-create-and-change-the-master-page-via-SharePoint-Designer.html

If you want to only grant access to admins, then probably the best security priviledge to use is "ManageWeb".    You put this as the permissions string in this line
<sharepoint:spsecuritytrimmedcontrol id="RIBBONHIDE_SPSecurityTrimmedControl3" permissionsstring="DeleteListItems" runat="server">

Open in new window

Here is a nice list of all possible permissions.  
http://alstechtips.blogspot.co.uk/2013/05/sharepoint-2010-spsecuritytrimmedcontro.html


I would suggest you start by following the instructions in this MSDN blog (its simpler than mine and I tended to take for granted that you had tried this first) to see explicitly what to do to your masterpage:
http://blogs.msdn.com/b/zwsong/archive/2010/04/29/how-to-hide-ribbon-from-users-without-edit-page-privilege.aspx

After applying these few changes to your copied masterpage, you will see the ribbon disappears for non admins :)
THere are a few issues with it removing the title area, and if you want to fix them then follow the additional instructions in my blog  :)