1) Identify the Fields (Site Columns), type and its properties. Each Field will have properties like ID(GUID), Display Name, Required, etc.
2) Create a XML file for adding the column information. Ex. “SiteColumns.xml” - This file holds the metadata information related to site columns (Fields). This file information used in
<ElementManifests>
See the following sample screens to get the better understanding
SiteColumns.xml
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Field Type="HTML"
DisplayName="About"
RichText="TRUE"
RichTextMode="FullHtml"
Required="FALSE"
Group="Custom Column"
ID="{246C6CAE-D801-11DD-A840-DC8E55D89593}"
StaticName="About"
Name="About" />
<Field Type="Image"
DisplayName="AboutImage"
RichText="TRUE"
RichTextMode="FullHtml"
Required="FALSE"
Group="Custom Column"
ID="{304952EE-D801-11DD-9B55-0C8F55D89593}"
StaticName="AboutImage"
Name="AboutImage" />
</Elements>
FEATURE.xml
<Feature Id="873CDC1A-D801-11DD-B399-959255D89593"
Title="Add Site Columns Feature"
Description="This Feature adds Site Columns"
Scope="Site"
Hidden="False"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="SiteColumns.xml"/>
</ElementManifests>
</Feature>
This post will also be helpful for the newbie’s to understand about Feature in SharePoint.
No comments:
Post a Comment