Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

population of same list types in a site definition

  Asked By: Johnpaul    Date: Jan 18    Category: Sharepoint    Views: 1164

I have a site definition configuration with 2 document library
instances, as follows:
<Lists>
<List Title="Shared Documents" Type="101" Name="Documents"/>
<List Title="Policies" Type="101" Name="Policies" />
</Lists>

Creating a site from this definition correctly creates 2 document
libraries in the site.
Now I want to pre-populate the home page with a list view web part
for each doc library, one in the left zone and the other in the
right zone:

<Module Name="Default">
<File Url="default.aspx" Type="Ghostable" NavBarHome="True">
<View List="101" BaseViewID="0" WebPartZoneID="Left"
Name="Documents" />
<View List="101" BaseViewID="0" WebPartZoneID="Right"
Name="Policies" />
</File>
</Module>

The problem appears to be the List ID. Since both the shared
documents and the policies are instances of document library,
the "Type" attribute must be set to 101. How do I then specify
different instances in the module tag?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Matt Prince     Answered On: Jan 18

Sorry, this is a limitation of the site  Definition. You have two options
as I see it:

1. You can create a Site Template based on your custom site definition
that contains both Web Parts.

2. You can use the ExecuteUrl I described in my SharePoint Advisor
article to programmatically add one of the Web Parts to the page  after
site creation is complete.

 
Didn't find what you were looking for? Find more on population of same list types in a site definition Or get search suggestion and latest updates.




Tagged: