Prasad Bolla's SharePoint Blog

Click Here to go through the Interesting posts within my Blog.

Click Here to go through the new posts in my blog.

Monday, November 28, 2011

Add custom menu item in Site Actions sharepoint 2010

The best Practice to add a Custom menu Item in SharePoint 2010 s Site Actions menu is by creating a Feature and installing that as a wsp in the SharePoint 2010 environment.

In this post you will how to create a feature and solution package for adding a Custom action item in Site Action menu.

Steps are :

1. Create a new Project in VS 2010 and under SharePoint (left) select Empty Project.

2. Now enter the url of your SharePoint site for debugging and select deploy as a farm solution.

3. Now, once you have the project open, right click on the Feature folder and Add a new feature.

4. SharePoint automatically adds a feature and names it as Feature1. You can however change the feature name to something like CustomActionFetaure.

5. With this you will have a feature designer opened in front of you set the Title description and scope of the feature.

6. Now right click on the Project and add a new Item. In the Add New Item dialog, select Empty Element to create a blank element file.

7. Add the below Code to the element.xml file

http://schemas.microsoft.com/sharepoint/”>
SharePoint.StandardMenu”
Sequence=”1000″
Title=”Open custom page”
Description=”Open my custom page”
ImageUrl=”_layouts/1033/images/myimage.png”>
CustomPage.aspx”/>

8. Build the Project. Open the feature.xml file and verify that if contains the reference to the element.xml file.

9. Now Deploy the wsp and activate the feature in your site.

No comments:

Post a Comment