WSS 3.0 Site Actions Menu Item
Add a custom menu item to the Site Actions menu in WSS 3.0 using a feature, then deploy it with stsadm.
You can add your own item to the Site Actions menu with a feature and a custom action.
Step 1: the feature
Create a WSP project and add a feature to the solution. Edit the feature file:
xml
<?xml version="1.0" encoding="utf-8" ?>
<Feature Id="B1FB6ECC-0039-4E08-A4B4-80B5B3C8DCE3"
Title="Sample Feature"
Description="New menu item on Site Actions"
Version="1.0.0.0"
Scope="Site"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="SampleFile.xml" />
</ElementManifests>
</Feature>
Step 2: the element file
Create an XML file called SampleFile.xml in the feature folder and add:
xml
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
GroupId="SiteActions"
Location="Microsoft.SharePoint.StandardMenu"
Sequence="1000"
Title="Your Title">
<UrlAction Url="/_layouts/YourPage.aspx"/>
</CustomAction>
</Elements>
Step 3: add and deploy the WSP
bat
stsadm -o addsolution -filename SampleSolution.wsp
stsadm -o deploysolution -name SampleSolution -url http://siteurl
Step 4: activate the feature
bat
stsadm -o activatefeature -filename SampleFeature\feature.xml -url http://siteurl
The new item now appears in the Site Actions menu and opens /_layouts/YourPage.aspx.