views:

774

answers:

3

Is there a way to (semi) automatically convert a sharepoint 2007 site template to a site definition? This seems like it could be quicker than building a site definition from scratch, yet provide the benefits of the site definition.

+1  A: 

Hi,

I think with VSeWSS 1.2 you can convert a site to an site definition.

Extract from the VSeWSS 1.2 announcement on the SharePoint Team blog:

SharePoint Solution Generator This stand-alone program generates a Site Definition project from an existing SharePoint site. The program enables developers to use the browser and Microsoft Office SharePoint Designer to customize the content of their sites before creating code by using Visual Studio.

So crating a site from a site template an then running VSeWSS 1.2 should do the trick.

Flo
I finally found the standalone SharePoint Solution Generator in the Start menu, and was unable to get it to find any sharepoint sites on that server. But from http://www.wsswiki.com/SharePoint_Solution_Generator it seems that this tool won't export site columns anyway, which means this is no use for me. I'll just be hand crafting a site definition, but I might be able to use the site template manifest.xml as a guide. Thanks anyway.
Michael Baltaks
A: 

Which defintion was used for the site template do you want to convert? I've found the SharePoint Solution Generator to be hit and miss. For example I can't get it to process blog sites. Worth a shot though.

BrianLy
Yes, I can't get it to recognise any sharepoint sites on the server. It seems very buggy.
Michael Baltaks
+1  A: 

One way you can do it to rename the Site Template (.stp) file to .cab and extract the content and get the onet.xml schema and customize it as you wanted it.

Kusek