The simplest way of creating site column is navigate to SiteActions->Site Settings->Modify all site settings->click on Site columns under Galleries section, shows the list of all available site columns.
We can create a column with list of available data types.
Creating Site column with feature.
We can create the Site columns with feature.xml.
Create a folder called Moss.Features.SiteColumn
Create two xml files feature.xml and Element.xml as follows.
copy the below code in feature.xml
Title="Moss.Features.SiteColumns"
Description="Custom MySite Columns"
Version="1.0.0.0"
Scope="Site"
Hidden="false"
xmlns="http://schemas.microsoft.com/sharepoint/">
Copy the below code in Elements.xml
Name="MyTitle"
Group="MyColumns"
DisplayName="MyTitle"
Type="Text"
Required="FALSE"
Sealed="TRUE"
MaxLength="250">
Note: here "Type" data type. You can mention any available datatypes.
Move this folder to 12hive feature folder, and install the feature as
stsadm -o installfeature -name Moss.Features.SiteColumns
Activate the feature as
stsadm -o activatefeature -name Moss.Features.SiteColumns -url http://servername:portno
This creates new site column called "MyTitle".
You can reuse this site columns for lists/document libraries.
stay glued for content types, Page Layouts, Master pages in my next posts.
Get back to me if you have any queries.
shreecanth@gmail.com