how to make available custom context menu item to display in subsites document libraries too

已答复 how to make available custom context menu item to display in subsites document libraries too

  • Friday, May 11, 2012 7:06 AM
     
     

    hi,

    can any one suggest.how to make available custom context menu to display in subsites document libraries to.Currently it is getting displayed only at root level document library.

    Below is my code:

    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
      <CustomAction Id="{80C5302A-FFCA-4DE1-AEF3-A40377575465}"
                    RegistrationType="ContentType"
                    RegistrationId="0x0101"
                    Location="EditControlBlock"
                    ImageUrl="/_layouts/IMAGES/DOCLINK.GIF"
                    Sequence="1200"
                    ShowInLists = "True"
                    Title="My Global Custom Menu"
                    RootWebOnly="FALSE"
                    Description="Shows an alert message for this content type.">
        <UrlAction Url="javascript:alert('Hello.!');" />
      </CustomAction>

    </Elements>


    Thanks & Regards, Krishna


All Replies

  • Friday, May 11, 2012 7:31 AM
     
     

    Hi, see links below to create custom actions. I think you need to set Location and Group ID:

    Custom actions: http://msdn.microsoft.com/en-en/library/ms460194.aspx

    Locations and Groups ID:http://msdn.microsoft.com/en-us/library/bb802730.aspx

    Regards.


    Tomás González. Twitter://@tgmourino

  • Friday, May 11, 2012 8:44 AM
     
     

    Thanks for Qick reply Tomas,

    Can you suggest exacetly what attributes and value to be included in <customAction> element.So that my custom context menu item will appear in subsite document libraries also with out issues.


    Thanks & Regards, Krishna

  • Monday, May 14, 2012 3:22 AM
    Moderator
     
     Answered
    What is the scope of feature you set? If it is web scope, have you activate it at sub site?
  • Monday, May 14, 2012 4:24 AM
     
     
    do your subsite libraries use the content type as well? it looks like you have attached this command to a content type.
  • Monday, May 14, 2012 4:28 AM
     
     

    Hi Bill Thanks for reply,

    Yes Bill my document libraries used custom content type.i have been using my custom content type to attach this context menu.


    Thanks & Regards, Krishna