To add a new menuitem.
create a feature that looks this (first part being the feature.xml and the second being the elements.xml) :
Feature Installation and Uninstallation
Although the best way to install a Feature is through a Solution, you can do it manually. Just keep in mind that you must do it in all the servers of the farm (whereas with the Solution, the multi-server deployment is automatically assured).
To install a Feature you have to create a folder in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES with the name of the Feature and copy the feature.xml and any other files (like Element Manifests) to that folder. Then you have to execute the following console command:
stsadm -o installfeature -name MyFolderName
Where MyFolderName is the name you gave the folder that contains the Feature.
To uninstall the Feature you have to execute the opposite console command (see below) and remove the folder you created.
stsadm -o uninstallfeature -name MyFolderName
Feature Activation
Similarly, besides activating and deactivating the Feature using the SharePoint UI, you can do it using console commands. To activate a Feature you have to execute the following command:
stsadm -o activatefeature -name MyFolderName -url http://MyServer/MyWebSite
Where MyFolderName is the name of the folder that contains the Feature, and http://MyServer/MyWebSite is the URL address of the web site where you want to activate the Feature.
like this --:)
No comments:
Post a Comment