SharePoint 2013 operating document library ECB menu

Source: Internet
Author: User

In the use of SharePoint, we often need to customize a series of SharePoint menus, including the ECB menu. Below, we will briefly understand how the ECB menu is customized and how it works.

1. Normally, the ECB menu of the document library is as follows:

2. Copy the following JavaScript code and add references to the page.

<script src="/_layouts/15/CORE2.JS" type="text/javascript"></script>

3. Hide View/Edit attributes;

The effect is as follows:

4. Hide a Workflow

Results:

5. Hide Version Control

AddVersionsMenuItem(c, a, g);

The effect is as follows:

6. Hide the check-out and release of the main version

AddCheckinCheckoutMenuItem(c, a, g);

The effect is as follows:

7. Hide the Downloaded copy

Results:

8. Hide the delete menu

Results:

9. Modify the ECB menu Template

Copy a callout. js file and reference it on the page to be modified. The path is also under layouts;

Modify the default template of the body part;

Modify the default footer template;

Results:

Summary

In fact, the menu of SharePoint ECB can be modified in a variety of ways. You can use feature to activate XML, you can use designer to directly add, you can use JavaScript, the default JS script is modified in this article. Remember to copy the modification and do not change the original one. Otherwise, the global effect will be affected.

If you want to modify other SharePoint JS files, try F12 debugging, find related methods, and try again. Well, here we are.

Appendix

How to: Hide menu items in ECB for Sharepoint list items

SharePoint 2013 custom extension menu (1)

SharePoint 2013 custom extended menu (2)

Add ECB menu for Sharepoint

SharePoint 2013 operating document library ECB menu

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.