Sunday, August 24, 2008

Controlling site templates availability for child site creation

Scnario:
You have a top level publishing site and you want to show only selective Site Templates for creating child sites.

Solution:
The Publishing Web Feature (ID 22A9EF51-737B-4ff2-9346-694633FE4416) contains some properties that allow us to specify master pages, page layouts and available web templates.Set that property as shown below.

Snippet:

<Property Key="AvailableWebTemplates" Value="*-MYSITEDEF#1"/>
AvailableWebTemplates Key Format is:
LCID-[sitetemplatename][#configurationnumber];LCID-[sitetemplatename]
[#configurationnumber];LCID-[sitetemplatename][#configurationnumber]

i.e. 1033-STS#1;1049-STS#1;*-ClientChildSite#0

*-STS#0 - ALL Languages


Note:
As this sample has dependency on Publishing , you can not use this in WSS.

0 comments: