Chris’s SharePoint Reflections

Just another weblog

  • Chris Zhong

    IT consultant Australia

  • Advertisements

Posts Tagged ‘feature’

Customization of SharePoint list menu item – Part 1 add Custom Action Item

Posted by chrissyz on June 6, 2009

It has been a while since last time I blogged. And I do feel bad about being ignorant of my blog for such a long time. So this time I am gonna show some code to feed those hungry souls. Today I would like to talk about adding a list menu item through feature. This example is to add a menu item in a calendar list.

We all know a feature includes two files, feature.xml and elements.xml

In our feature.xml, nothing special, it will look like any other normal

<?xml version=1.0encoding=utf-8?>

<Feature  Id=GUID”
          Title=Calender list Menu
          Description=Creates Custom Action in Calender list item menu”


<ElementManifest Location=elements.xml/>



Then comes the elements.xml

<?xml version=1.0encoding=utf-8?>

<Elements xmlns=>

    Title=Calendar Custom Action>


RegistrationType can be “ContentType”, “FileType” (for example if you only want your feature appear to .xsn file), list and Prog ID.

The RegistrationID element is used to specifiy the ID of RegistrationType. If RegistrationType is “ContentType”, to get Registration ID, open the document library settings, in the ContentType section click on the content type you
choose, then grab the hex string in the url after “ctype=” parameter.

If you use FileType as RegistrationType, then just add the “.doc” or “.xls” etc in the RegistrationID

If the RegistrationType is list or ProgID, John Holiday has a blog summarized all the RegistrationID, look it up!

Adding a CustomAction menu item is not that difficult, however, it is a bit tricky to hide/remove it. I will talk abou it in my next post – Customization ofSharePoint List Menu Item – Part 2 Hide Custom Action Item


Posted in development | Tagged: , | 1 Comment »