Solved

Hiding the Ribbon in SharePoint 2010

Posted on 2014-10-08
4
184 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 500 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SharePoint 2013 search webpart - query suggestions 5 54
daypilot scheduler 3 26
Show/Hide ASP.NET controls with JQuery best practices 3 45
asp.net mvc5 6 12
There is one common problem that all we SharePoint developers share: custom solution deployment. This topic can't be covered fully in this short article, so all I want to do in this one is to review it from a development-to-operations perspectiv…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

813 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now