0

I'm searching for a way to customize the context menu, which is opened when one clicks on the (...) of any item in any document library.

Following things I would like to realize:

  1. I would like to remove the first step of this context menu (the view of document) and jump right into the context menu, which is opened when one clicks in this "pre-view of the document" again on the three points.
  2. I would like to have my own entries in this context menu and remove all I don't need

I'm using SharePoint 2013 and I don't have any access to SharePoint Designer and no rights to edit masterpage - That's why I am kinda dependant on JavaScript solutions for Script Editor Web Part.

Thanks in advance.

1

If you want to add new item in context menu within document library than please follow steps mentioned in below links.

How to Create Context Menus on Pages Document Library in SharePoint 2013

If you want to remove the context menu displayed on the first step when you click on (...) than please use below mentioned code.

SPList list = site.RootWeb.Lists["YourListName"];
SPField field = list.Fields["Name"];
field.CalloutMenu = false;
field.CalloutMenuAllowed = SPField.ListItemMenuState.Prohibited;
field.ListItemMenu = true;
field.ListItemMenuAllowed = SPField.ListItemMenuState.Required;
field.Update();
list.Update();
  • The problem is, that I don't have the required VB software on my companies laptop. My only way to embed code is the Script Editor Web Part. I'm also a kinda rookie if its about C#, means I have no clue how to embed C# to SharePoint. Thanks for your help mate :) – SteffPoint May 17 '16 at 13:07
  • have you tried this if it works for you?...sharepoint-insight.com/2009/02/19/… – Hardik May 17 '16 at 13:10
  • it works on SP2007.. Not sure about SP2013 – Hardik May 17 '16 at 13:11
  • have you find any solution? – Hardik May 17 '16 at 14:55
  • your comment, showing the tutorial, works to a certain extent. By that I mean it is a way to solve a part of my question, but not completely. It is a solution for my task "2)", but task "1)" seems not to be doable with that or I just don't know the required coding. – SteffPoint May 18 '16 at 6:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.