Thursday, July 7, 2011

How to add List Template to SharePoint Site

So far we might came across adding WebParts,Pages,Page Layout,CSS you name it any SharePoint artifacts are deployed using the famous Feature.xml and Elements.xml.
Here is how you should define your Elements.xml
  <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Url="_catalogs/lt" Name="Summary Links.stp" Path="SummaryListTemplate">
        <File Url="Summary Links.stp" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE">
        <Property Name="Title" Value="StpTest" />
        <Property Name="Language" Value="1033" />
        <Property Name="FeatureID" Value="{00BFEA71-2062-426C-90BF-714C59600103}" />
        File>
    Module>
Elements>
In My Project I have kept the list template under Features/SummaryListTemplate hence the path in the elements.xml

No comments:

Post a Comment