SharePoint 2013 hide some ribbon menus

Source: Internet
Author: User

In the use of SharePoint, because users often do not want to see the operations that are not frequently used, we often need to customize the ribbon menu, and most of the time it is not hidden, instead, we can hide the ones we don't need. Next, we will take a list as an example to briefly introduce how to partially hide the ribbon menu.

1. By default, the list ribbon menu has two parts: item and list, for example:

2. ribbon menu and List tab of list, which are not required by common users;

3. Create a solution and add a webpart to it to hide the ribbon menu;

You must reference Microsoft. Web. commandui at the following position;

C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.Web.CommandUI.dll

4. Add the attribute ribboncollection to save the hidden ribbon IDs. Separate multiple IDs with semicolons. Then add the hidden menu method, for example:

5. Add our webpart on the page to be hidden, for example:

6. In our webpart settings, add the ribbon ID to be hidden, for example:

7. For details, refer to the ribbon ID. Multiple IDs are separated by semicolons;

8. view the hidden effects, and only the basic operations of the list items are left. The List tab and workflow menus are not available, such:

9. view the ribbon ID. Generally, you can view it in Microsoft documents. You can also view the ribbon ID on the F12 page, for example:

Like ribbon. listitem. Manage. managepermissions-medium, we need to remove the final medium, which only indicates the menu size, and the previous part is the ribbon ID;

Summary

In this example, ribbon is hidden for pages. Therefore, if you want to use webpart for global hiding, you can write user controls and place them in the master page to hide them.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.