Choose Skin

Creating Custom Menu Item in Context menu or ECB menu using Sharepoint Designer in sharepoint.

Manish Kumar

In Sharepoint List and Libraries, Context menu or ECB(edit,control or block) are provided just because to perform some action on particular list item. By default ECB menu contains few options such as "View Item","Workflows","Delete Item" etc. 

There are various ways by which we can add our own custom actions menu to provide extra functionality to our sharepoint site. The various ways are:

  • Custom ECB menu can be added by the help of SharePoint Designer, In sharepoint Designer open the List and add Custom actions.
  •  We can Add Custom ECB menu by the help of Visual Studio by creating Elements.xml file and writing our functionalities to that file.
  •  The another option is by creating Javascript file to add Custom ECB menu and add it to the List or Library.

       profile picture

Here, I am going to create a Custom menu Item in ECB Menu using SharePoint Designer. This is the easiest way to add the Custom Menu actions in sharepoint list or Libraries. It can be used to show Javascript popups, modals or you can create a Lookup to some other Sharepoint List by passing the ItemId as parameter in javascript url or you can create customize action whatever you want according to your need.

1. Open sharepoint Designer, and open your site.
2. Open the List or Libraries in which you want to create the custom action.

   profile picture

3. Click on New to create a custom action.

      profile picture

You have two options here, 

  1. Navigate to form :- If you want to display particular list items in display or edit mode.
  2. Navigate to URL : Here you can write you custom url by adding javascript snippets to perform customized action.

An Example of URL can be: 

javascript:OpenPopUpPageWithTitle('/_layouts/spstsolution/Approvesign.aspx?ApproverSignID={ItemId}','RefreshOnDialogClose', 750,300,'Approve Document')


After Doing this, Just Refresh your sharepoint site page and check for custom menu,

   profile picture