Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have created Content types namely Folder content type and Document content type, the issue is when i click on the ECB menu at folder level i get an option Edit Folder Form but when i click on the ECB menu at Document level i get the same option Edit Folder Form which is not proper, i want to remove this option at Document level is it possible??

How can i change the ECB menu based on Content type?? I want that when i click on ECB menu at folder level i get Edit Folder Form option and when i click the ECB menu at Document level i should not get that option

Please advise

share|improve this question

2 Answers 2

Yes you can do that by specifying a Custom Action. Sample looks something like this:

    <CustomAction
    Id="Test"
    Location="EditControlBlock"
    Sequence="1000"
    Title="Test Title"
    RegistrationType="ContentType"
    RegistrationId="0x0120"
    Rights="ManagePermissions"
    Description="Test Description"
    >
    <UrlAction Url="~site/_layouts/TestProject/TestPage.aspx?ListID={ListId}&amp;ID=            {ItemId}"/>
    </CustomAction>

UPDATE

@Richard, Some of the properties of the current list item are present on the page. You can use them if they can meet your requirementsenter image description here

CAMOpt and CAMSep are used to add ECB item and separator. These are OOB functions.

share|improve this answer
    
Hi Nadeem, how do you check item properties, and upon that display/hide the custom action? –  Richard Dec 6 at 23:04
1  
See this sharepointnadeem.com/2012/07/… –  Nadeem Yousuf Dec 7 at 2:59
    
Hi Nadeem, I saw this, but this checks the properties of the list itself, how do we check the properties of the item we show the ECB for? Like how do I check an item's property and upon that to display or hide the item menu? the post describes only how to check context of the list, it does not describe as well the CAMOpt and CAMSep, are these custom functions? –  Richard Dec 7 at 6:50
1  
@Richard, see my updated answer. –  Nadeem Yousuf Dec 8 at 13:25
    
Thanks, you're the best –  Richard Dec 8 at 17:20

I have written a blog post which shows how to conditionally show an ECB menu item. Here the condition I check is whether versioning is enabled or not. You can extend it to fix you issue. http://sharepointnadeem.blogspot.in/2012/07/conditionally-show-menu-item-in-ecb-menu.html

share|improve this answer
    
Hi thanks for the link, i have another query is it possible to call my custom form when i click on Edit properties in the ECB menu if yes can you help me with this. Do i need to write java script or how should i proceed. –  user1046930 Sep 7 '12 at 6:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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