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.
This posting is provided "AS IS" with no warranties, and confers no rights.
浙公网安备 33010602011771号