Friday, August 10, 2012

Deploy Custom List templates(.stp) as Feature based Solution in SharePoint

Requirement: Had a custom List template, and wanted to make it available in create page of all sites of the site collection.

Solution:  How to deploy SharePoint list template? Create a WSP builder solution to deploy the .stp file to the List template gallery of required site collections! Just create a Feature with the below element.xml file. Add the .Stp file to the solution.

Here is Elements.xml file:
 <?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="EnrollmentTemplate" List="114" Url="_catalogs/lt" RootWebOnly="TRUE">
    <File Url="Enrollment.stp" Type="GhostableInLibrary">
      <Property Name="LanguageDisplay" Value="English" />
      <Property Name="Version" Value="3" />
    </File>
  </Module>
 </Elements>

Project Structure:
SharePoint 2007 Project to Deploy List Templates (.stp)

Same way, Custom Site templates also packed.Just Change the line in element.xml as:
<Module Name="EnrollmentSiteTemplate" List="116" Url="_catalogs/wt" RootWebOnly="TRUE">



You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...