Customization of Sharepoint list menu item-Part 1 add custom action item

Source: Internet
Author: User
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 wowould 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 between des two files, feature. xml and elements. xml

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

<? XML version = "1.0" encoding = "UTF-8"?>

<Feature id = "guid"
Title = "calender list menu"
Description = "creates custom action in calender list item menu"
Version = "12.0.0.0 ″
Hidden = "true"
Scope = "site"
Xmlns = "http://schemas.microsoft.com/?point/">
<Elementmanifests>

<Elementmanifest location = "elements. xml"/>

</Elementmanifests>

</Feature>

Then comes the elements. xml

<? XML version = "1.0" encoding = "UTF-8"?>

<Elements xmlns = "http://schemas.microsoft.com/?point/">

<Customaction
Id = "F699684E-3127-428e-BF2B-EA71CA6E36C8"
Registrationtype = "list"
Registrationid = "106"
Location = "editcontrolblock"
Sequence = "1000"
Title = "calendar Custom Action">
<Urlaction
Url = "~ Site/yourpagelibrary/yourcustompage. aspx? Id = {Itemid} & amp; List = {listid} "/>
</Customaction>

</Elements>

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 regiid 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 authentication .doc "or 2.16.xls" etc in the registrationid

If the registrationtype is list or progid, John holiday has a blog summarized all the registrationid, look it up!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.