Wednesday, August 26, 2009

Adding/Customize action menu in SharePoint

A common requirement that every Sharepoint developer is asked for today is customization of the SharePoint site based on various customer specific requirements. Most often customers have requirements where they want to add some additional features to action menus like Site action menu, ECB menu or List/library Action menu, etc. To achieve this, we have to write custom action in XML and consume it within the site as a new feature. In Sharepoint if we need to integrate new feature for a List / Library, we can achieve this easily by creating a custom action feature.


1. Create a folder named TestCustomAction under C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES directory.


2. Next, create a file named Feature.xml in the same folder with the following codes.

Enlarge the image

3. Next, create another file, TestCustomActions.xml in the same folder with the following codes.


Enlarge the image

4. Create a page named TestCustomActions.aspx under layouts folder and add your own Business Logic.


5. Finally, deploy this feature by running the command in the command prompt.


To activate this feature: stsadm -o installfeature -filename TestCustomAction\feature.xml -url http://TestServer/Site.

Finally to see the changes in the site do an iisreset.

See here also:Adding/Customizing action menu in SharePoint

Samarendra Swain

No comments:

Post a Comment