none
Hide/remove ribbon on public website

    Question

  • The new ribbon in SP2010 looks nice from a editors point of view. All webparts seems controlled by the contextual ribbon.

    Using webparts on a public website, like a discussion board, can the webparts be operated without the ribbon? Eg. creating and editing forum posts and other basic operations.

    The public website is fully skinned and therefore only the editor should see the ribbon for page and webediting. How is this done in SP2010?

    Friday, December 18, 2009 4:47 AM

Answers

  • What template are you using as your public website?

    If you would like to get the creating/editing functions right from the web part, hover over the web part and click the drop down arrow in the top right - select Edit Web Part. In the List Views section, under Toolbar Type, change it to Show Toolbar. Click Apply/OK and that will give you the New, Actions, and Settings buttons right on the web part (just like you would have if you navigated directly to the list or library).

    Thanks,
    Adam Preston
    Blog: http://sptwentyten.wordpress.com
    Friday, December 18, 2009 11:58 AM
  • I posted code that shows how this is done here: http://www.elumenotion.com/Blog/Lists/Posts/Post.aspx?ID=106
    I hope it helps.
    Wednesday, January 06, 2010 10:29 PM
  • I came across this thread and the answers to the question, "only the editor should see the ribbon for page and webediting" didn't really provide a solution for me. I did find an alternative though that provides much more control:

    In your MasterPage, wrap any controls (in this case, the whole div that contains the ribbon) in:

    <Sharepoint:SPSecurityTrimmedControl runat=”server” Permissions=”ManageWeb”>
    
    </SharePoint:SPSecurityTrimmedControl>

    More info about this control and its parameters here:
    http://fusionovation.com/blogs/mbell/archive/2008/09/18/security-trimmed-controls-in-sharepoint.aspx

    • Proposed as answer by Alpesh NAKAR Wednesday, June 02, 2010 4:59 AM
    • Marked as answer by Clayton Cobb Thursday, September 02, 2010 3:33 AM
    Tuesday, May 04, 2010 2:09 PM

All replies

  • What template are you using as your public website?

    If you would like to get the creating/editing functions right from the web part, hover over the web part and click the drop down arrow in the top right - select Edit Web Part. In the List Views section, under Toolbar Type, change it to Show Toolbar. Click Apply/OK and that will give you the New, Actions, and Settings buttons right on the web part (just like you would have if you navigated directly to the list or library).

    Thanks,
    Adam Preston
    Blog: http://sptwentyten.wordpress.com
    Friday, December 18, 2009 11:58 AM
  • I posted code that shows how this is done here: http://www.elumenotion.com/Blog/Lists/Posts/Post.aspx?ID=106
    I hope it helps.
    Wednesday, January 06, 2010 10:29 PM
  • The following might be a known fact, but I didn't see it mentioned in your post so I'll mention it: In the Publishing site template (which you should use for public websites), there is a Show/Hide Ribbon option under Site Actions drop-down menu.
    Asif Rehmani, MVP. Host of http://www.sharepoint-videos.com (SharePoint and InfoPath Video Tutorials). Co-author of Book "Professional SharePoint Designer 2007"
    Tuesday, January 12, 2010 7:42 PM
  • Nice Post but the easiest way to achieve this is to put a securitytrimmed control around the ribbon. If a user doesn't have the specific right the ribbon would be automatically hidden.

    The question here is how to use the Show / Hide From Site Action Menu. I have the same Problem in my installation.
    Wednesday, January 20, 2010 8:25 PM
  • I very much like the idea of placing a security trimmed control around the ribbon.  Can you elaborate a little on this?  If you could provide an example, that would be great.  I am new to SharePoint, so I apologize ahead of time for the ignorance.  If you could provide some code that would be great.

    Thanks,
    Thursday, January 28, 2010 4:48 AM
  • I came across this thread and the answers to the question, "only the editor should see the ribbon for page and webediting" didn't really provide a solution for me. I did find an alternative though that provides much more control:

    In your MasterPage, wrap any controls (in this case, the whole div that contains the ribbon) in:

    <Sharepoint:SPSecurityTrimmedControl runat=”server” Permissions=”ManageWeb”>
    
    </SharePoint:SPSecurityTrimmedControl>

    More info about this control and its parameters here:
    http://fusionovation.com/blogs/mbell/archive/2008/09/18/security-trimmed-controls-in-sharepoint.aspx

    • Proposed as answer by Alpesh NAKAR Wednesday, June 02, 2010 4:59 AM
    • Marked as answer by Clayton Cobb Thursday, September 02, 2010 3:33 AM
    Tuesday, May 04, 2010 2:09 PM
  • Dear Doug;

    seems your link will work for me but small thing is missing causing error in this code; which is in the last line, typeof(HideTheRibbon); seems HideTheRibbon is class that my vs doesn't see it, is there namespace i should add or is this ur class that u created?

    i hope ur code can solve my problem, appreciate your fast responce.

    Thanks.


    Mai Omar | Senior Solutions Developer | ITEgyptCorp | Email: maio@ITegyptCorp.com | Blog: http://maiomar.itegyptcorp.com
    Tuesday, June 15, 2010 10:09 AM
  • I too am struggling with this issue.  SecurityTrimmed Control works great for hiding the ribbon but my scrollbars do not work.  Doug's solution looks nice  but I am having the same issue Mai is having regarding the HideTheRibbon class.
    Wednesday, July 28, 2010 1:25 PM
  • Instead of using SecurityTrimmed Control use Permissions Property of SPRibbon Control

    <SharePoint:SPRibbon
      runat="server"
      PlaceholderElementId="RibbonContainer" Permissions="ManageWeb" 
    

    Shabih
    Wednesday, August 11, 2010 6:34 AM
  • Hmm, so I have tried

    <sharepoint:spsecuritytrimmedcontrol permissions="”ManageWeb”" runat="”server”">Your control here</sharepoint:spsecuritytrimmedcontrol>

    and

    <SharePoint:SPRibbon runat="server" PlaceholderElementId="RibbonContainer" Permissions="ManageWeb">

    Then tried logging in as a user that only has read level permissions of the site and neither of the solutions above work for me.  I still see the ribbon.

    What am I missing?

    I am building a public-facing website and would like the ribbon viewable for those who have rights to manage the site, but not for visitors to the site.

    Thanks!

    Jill

    Thursday, September 30, 2010 9:36 PM
  • You can also use this solution to show/hide the ribbon : http://spribbonvisibility.codeplex.com/. It remove the ribbon using Javascript

     

    • Proposed as answer by jriesen1 Friday, October 01, 2010 2:35 PM
    Friday, October 01, 2010 10:32 AM
  • Thank you, lefortludovic, for a comprehensive solution to a problematic issue.  I installed and deployed on my public facing site and this solution works great.  One caveat ... now can you also add some code to your solution that will collapse the space where the ribbon sits?  Although I don't see any features of the ribbon the space is still visible.

    Thanks!!!!!!   :-)

    Jill

    Friday, October 01, 2010 2:38 PM
  • done, you can download the new version from codeplex.

    Regards,

    Wednesday, October 06, 2010 8:18 AM
  • There is a simplest CSS+SPSecurityTrimmerControl solution (you don't need to wrap anything)

    http://buyevich.blogspot.com/2010/08/hide-ribbon-from-visitorsanonimus-users_31.html

     

     

    Wednesday, October 06, 2010 2:48 PM