Jason D. Nadrowski

In customizing the internet publishing site definition, I noticed there is an option to limit the available template(s) for any subsites that are created in a site collection. The "AvailableWebTemplates" is what does it. By example, I understand how to limit it to only ONE template -- see below. I am guessing the "*-" means remove all templates and the subsequent text is of the form <ConfigurationName>#<ConfigurationID>.

<!-- Snippet from my custom ONET.XML -->
<
Feature ID="22A9EF51-737B-4ff2-9346-694633FE4416">
<!--
Publishing -->
<
Properties xmlns="http://schemas.microsoft.com/sharepoint/">
<
Property Key="ChromeMasterUrl" Value="~SiteCollection/_catalogs/masterpage/mycustom.master"/>
<
Property Key="WelcomePageUrl" Value="$Resources:cmscore,List_Pages_UrlName;/default.aspx"/>
<
Property Key="PagesListUrl" Value=""/>
<
Property Key="AvailableWebTemplates" Value="*-MyTemplateName#1"/>
<
Property Key="AvailablePageLayouts" Value=""/>
<
Property Key="AlternateCssUrl" Value="" />
<
Property Key="SimplePublishing" Value="false" />
</
Properties>
</
Feature>

However, I have not been able to figure out how to limit it to TWO or more templates. I have tried all sorts of combinations and delimiters to no avail. Some help on the syntax for TWO or more templates would be MUCH appreciated.



Re: SharePoint - Design and Customization Syntax of AvailableWebTemplates

Christian Gram

Hi Jason

I don't know if you have found the solution, Bernado in this this link sugest

<Property Key="AvailableWebTemplates" Value="*-[siteDef];*-[siteDef],*-[siteDef]"/>
like this

<Property Key="AvailableWebTemplates" Value="*-STS#0;*-STS#1"/>

I have a similar problem with AvailablePageLayouts, I can't find a way to allow more than one pagelayout.

Regards

Christian





Re: SharePoint - Design and Customization Syntax of AvailableWebTemplates

Renatas Lauzadis

If you look at the search site template you will notice that it uses following syntax:

<Property Key="AvailablePageLayouts" Value="~SiteCollection/<site collection relative path1>:~SiteCollection/<site collection relative path2>:~SiteCollection/<site collection relative pathX>"/>

Good luck!

Renatas.





Re: SharePoint - Design and Customization Syntax of AvailableWebTemplates

Christian Gram

Hi Renatas

: looks like the answer, I thought I tried everything, but this works

Thanks

Cheers

Christian