How to set AvailableWebTemplates to custom WebTemplate created via features

In SharePoint 2010 you can use the new <WebTemplate> element in a feature to create a custom web template (sort of equivalent to site definition). Good overview of how this compares to other methods of creating site template/definition: http://sharepointchick.com/archive/0001/01/01/site-definitions-vs.-webtemplates.aspx.

In a web template or site definition you can use the AvailableWebTemplates property of the Publishing feature (22A9EF51-737B-4ff2-9346-694633FE4416) to restrict the web templates that can be used to create sub sites under the given site.

Use the naming convention “*-{FeatureID}#{WebTemplateName};*-{FeatureID}#{WebTemplateName}” to refer to your custom WebTemplate in the value of this property. FeatureID should be wrapped in { }, and there have been reports that it should be upper-case.

Leave the value of this property blank to allow all web templates (if the web was a root web), or inherit from parent’s settings (if the web was a sub web).

 

Unknown's avatar

About Bernado

Based in Australia, I am a freelance SharePoint and Dynamics CRM developer. I love developing innovative solutions that address business and everyday problems. Feel free to contact me if you think I can help you with your SharePoint or CRM implementation.
This entry was posted in SharePoint 2010, WebTemplate. Bookmark the permalink.

Leave a comment