Question

A SharePoint site template is basically a saved version the differences between a Site Definition and the current state of a site. I've read that Site Templates can only be applied to sites that use the same Site Definition that was used to create the template.

If you have an STP file, how do you determine which Site Definition was used to create the Site Template?

Was it helpful?

Solution 2

Use these steps to determine what site definition a site template was based on:

  1. Save the .STP site template to a local folder.
  2. Rename it to a .CAB file.
  3. Extract the cab file.
  4. Open the manifest.xml file.
  5. There will be a TemplateID value in the section near the top (e.g. 1)
  6. The TemplateID refers to a site defintion.
  7. Open [12 hive]\TEMPLATE\1033\XML\WEBTEMP.XML.
  8. Find the template name with the ID that corresponds to the TemplateID in the site template manifest file (e.g. )

I'm not sure why, but the site definitions are grouped so that you might not know exactly which site definition was used. For example, Team Site, Blank Site, and Document Workspace all share the same Tempalte ID (1). That should mean that a site template with that ID should be able to be applied to any of those 3 sites.

OTHER TIPS

STP files are just ZIP-compressed files. If you rename the extension to *.ZIP you can extract the contents and examine the XML files that will contain the info you are looking for.

I don't have a STP file around so I can't tell you exactly what file to look for but I've done that before and is not that hard to find.

Good luck!

I have written SharePoint Object Model code list all the sites and the site definition used to create the side. Please see this here:

http://manish-sharepoint.blogspot.com/2009/06/finding-template-used-to-create-sites.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top