locked
Adding a menu item to the ecb menu of the version history dialog box RRS feed

  • Question

  • Hi,

    I would like to add custom menu items to the ecb menu of the version history. Currently there are three options - View, Restore and delete. But i would like to add a few more menu items and run a server side code when any of the option is selected.

    Can anyone guid me on how this can be achieved.

    Any help would be appreciated.

    Thanks !

    Friday, June 1, 2012 10:30 AM

Answers

  • You will have to override the Versions.aspx page located in _layouts. Unfortunately, this will override it for all document libraries in the farm. I don't recommend this. What functionality are you trying to add to the this drop down menu, maybe there is an alternative.

    Blog | SharePoint Field Notes Dev Tool | ClassMaster

    • Marked as answer by Qiao Wei Friday, June 15, 2012 10:39 AM
    Friday, June 1, 2012 2:52 PM

All replies

  • I don't think this is possible

    The normal way to add a button to the UI is to use a custom action.  However, you need the ID of the group to put it in.  As far as I can tell, this menu doesn't have a group ID.  Adding the button on the client side would be almost impossible as well.  The menu isn't generated in the DOM until the dropdown next to the item is clicked.


    Bob Guidinger
    Please remember to click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.

    Friday, June 1, 2012 12:17 PM
  • Probably not impossible, but definitely not trivial and not without risk to breaking other things.

    I imagine you'd have to customize at least a couple of the SharePoint XSLT's to add the additional options and wire them into the code behind.

    Friday, June 1, 2012 1:32 PM
  • You will have to override the Versions.aspx page located in _layouts. Unfortunately, this will override it for all document libraries in the farm. I don't recommend this. What functionality are you trying to add to the this drop down menu, maybe there is an alternative.

    Blog | SharePoint Field Notes Dev Tool | ClassMaster

    • Marked as answer by Qiao Wei Friday, June 15, 2012 10:39 AM
    Friday, June 1, 2012 2:52 PM