Setting AvailableWebTemplates and AvailablePageLayouts in SiteDefinition

原文链接:http://balle3201.blogspot.com/2007/06/setting-availablewebtemplates-and.html

 

When creating customized Site Templates (Site Definitions) in SharePoint (2007), you may want to define which WebTemplates and PageLayouts that should be available on each Site.

To do so, locate the following Feature in onet.xml:

[Feature id="22A9EF51-737B-4ff2-9346-694633FE4416"]

Add a Propery tag for both AvailableWebTemplates, and AvailablePageLayouts under Properties as shown here:

[properties]
[property key="AvailableWebTemplates" value="*-MyCustomSiteTemplate#3"]
[property key="AvailablePageLayouts" value="~SiteCollection/_catalogs/masterpage/MyCustomPageLayout.aspx"]
[/properties]

"3" corresponds to the Configuration ID in onet.xml

To define multiple pagelayouts, seperate each layout with a colon ":"

You can also add additional Property-Settings like WelcomePageUrl, PagesListUrl, AlternateCssUrl, etc. within the Properties-tag.

posted on 2008-11-08 18:18  王丹小筑  阅读(191)  评论(0)    收藏  举报

导航