tags:

views:

751

answers:

2

Is it possible to create a custom site definition template with 'n' number of custom document libraries and content types. I have copied the ONET.xml file from the STS folder, i.e. I am trying to create a template the same as that of the OOTB Team Site template by modifying the ONET.xml but it fails.

My ONET.xml contains the default configuration with a custom master page. Inside that Configuration tag I am specifying my custom List as follows:

<Configuration ID="0" Name="Default" CustomMasterUrl="_catalogs/masterpage/samplests.master">    
<Lists>
<!-- Here I am defining a Custom List to be created with the OOTB List like Tasks -->
<List Name="SimpleList" Title="Simple List" BaseType="0" Direction="" Url="" />
</Lists>    
</Configuration>

Now while creating a site I select my custom template and it gives the error as follows:

Cannot complete this action.
Please try again.
A: 

Can you Try this

<List FeatureId="00BFEA71-DE22-43B2-A848-C05709900100" Type="100" Title="Simple List" Url="Lists/Simple List" />

I use this way. Feature Id is the ID of the Custom List Feature

Url is Must which is missing from your Code

Kusek
A: 

Now I can create a list or document library. The issue is I am not able to create a List\Document Library with different content types. If I want to achieve this functionality then I need to create a Custom List Definition and in that definition I need specify the Different content types with corresponding fields in the schema file(schema.xml).

Is there any other way to achieve this functionality?

Tejas
Tejas, this site doesn't work very well for discussions. I strongly recommend you ask a new question with as much detail as you can, and why the existing functionality doesn't work for you.
Alex Angas