Tuesday, March 17, 2009

adding a new menu Item in Sharepoint. (SharePoint Features)

WSS 3.0 - How to create new SharePoint Feature?
How to create New Feature in WSS 3.0? / MOSS 2007

How to add new menu item under “Site Settings” menu in wss 3.0?

1. Create a new folder, called “SabinsNewFeature”, in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES

2. Create an Xml file, called “feature.xml” in the “MyListUserFeature” folder
3. Edit the feature.xml file and add the following content


Title="Feature My List User Feature"
Description="Custom action on Site Actions"
Version="1.0.0.0"
Scope="Site"
xmlns="http://schemas.microsoft.com/sharepoint/">





4. Replace the GUID placeholder in the previous Id attribute, generate a GUID by running guidgen.exe, located in Local_Drive:\Program Files\Microsoft Visual Studio 8\Common7\Tools.

Create an Xml file, called “ListUsers.xml” in the “SabinsNewFeature” folder

5. Edit the file and add the following content


GroupId = "SiteActions"
Location="Microsoft.SharePoint.StandardMenu"
Sequence="1000"
Title="List Users">



6. Install the new feature by running the following command by going to Start>Run>cmd

change to the following directory: %COMMONPROGRAMFILES%\Microsoft shared\Web server extensions\12\Bin. (Because, STSADM.EXE sits in this folder )

Execute the following command from the above location

Stsadm –o installfeature –filename SabinsNewFeature\feature.xml

You will get a message saying "Operation completed Successfully"

7. Activate the new feature by running the following command
stsadm –o activatefeature -filename SabinsNewFeature\feature.xml -url http://siteurl

if your site has been in the port,
stsadm –o activatefeature -filename SabinsNewFeature\feature.xml -url http://siteul:port number


Now you will see the new menu item in the "Site Settings" of the site that you installed the feature.

No comments: