Thursday, 11 April 2013

Deploy SharePoint 2010 List Template

Add a module named as stp (Or whatever you want) using VS 2010.
Add .stp file under module section.
The module should look like as follows:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="">
  <Module Name="stp" Url="_catalogs/lt" Path="">
    <File Path="stp\DesignLibrary.stp" Url="DesignLibrary.stp" Type="GhostableInLibrary" IgnoreIfAlreadyExists ="TRUE" >
      <Property Name="Title" Value="DesignLibrary" />
      <Property Name="Language" Value="1033" />
      <Property Name="Version" Value="4" />
and deploy the solution. Thats it.

Please do not use
<Property Name="FeatureID" Value="{3A71B642-D88C-48A4-BEB7-FC8DD4EFF9FE}" />

because List template itself set feature id.
If you add the above property, It will add your stp in List template but you will not be able to use as template. while creating list/library using this template,It will not be available in creation webpart.

No comments :

Post a Comment