The element types that can be defined by a feature include menu commands, link commands, page templates, page instances, list definitions, list instances, event handlers, and workflows.
At a physical level, Feature has a directory within filesystem of each front-end web server.
The directory has one or more xml files that contain CAML and a manifest file named feature.xml that defines high level attributes of feature(ID, Title..)and additional xml files (elements.xml) that contain actual elements that make up a feature and other file types/resources like css, js, graphics.
With Moss, there will be more than 100 default Features.
To create a hello world feature.. which is a very popular way to begin composing features....:
go to
c:\program files\common files\ microsoft shared\web server extensions\12\template\features
create a visual studio project and make a folder "heallo world" or create a new folder in Features directory and create the below xml files in it.
feature.xml
Description= "This is my very first custom feature"
Scope='web"
Hidden="False"
ImageUrl="menuprofile.gif"
xmlns = "http://schemes.microsoft.com/sharepoint/">
Element Manifest file:elements.xml
GroupId="SiteActions"
Location="Microsoft.Sharepoint.StandardMenu"
Sequence="100"
Title="Hello world"
Description="A custom menu item added using a feature"
ImageUrl="_layouts/images/menuprofile.gif"/>
go to command prompt and then to the folder Features
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES>
and execute this command
..\..\BIN\STSADM.exe -o InstallFeature -filename Helloworld\feature.xml -force
or
%STSADM% -o InstallFeature -filename helloworld\feature.xml -force
and reset the IIS
at command prompt: IISRESET
Once the feature has been properly installed, it can be activated within the context of the site,
site settings--> site features--> shows list of features .
click "Activate" for Helloworld feature.
check the site Actions menu, a new CustomAction element called "hello world " is added to it.
Reference: "Inside Microsoft Windows Sharepoint Services 3.0" -Ted Pattson, Daniel Larson, Microsoft Press