Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Hiding the Ribbon in SharePoint 2010

Posted on 2014-10-08
4
Medium Priority
?
217 Views
Last Modified: 2014-10-27
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.
0
Comment
Question by:polaris101
  • 2
  • 2
4 Comments
 
LVL 15

Accepted Solution

by:
colly92002 earned 2000 total points
ID: 40370905
I wrote a blog post that tells you explicitly how to do this. It does require editing to the master page and some CSS and JavaScript, but can all be done using SharePoint designer.

See this:http://the-simple-programmer.blogspot.com/2014/01/hiding-sharepoint-2010-ribbon-from.html
0
 

Author Comment

by:polaris101
ID: 40371202
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?
0
 

Author Comment

by:polaris101
ID: 40373526
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.
0
 
LVL 15

Expert Comment

by:colly92002
ID: 40375678
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  :)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
Loops Section Overview
Screencast - Getting to Know the Pipeline

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question