I
was trying to set up variations in a SharePoint 2010 environment and my target
was to use one of my custom publishing site templates to use for provisioning
the source variation site.
Since
SharePoint says all the publishing site templates will be listed down in the Source
Variation selection, I started with SharePoint default “BlankInternet” site
template to create a custom site definition and make sure all the publishing
features were enabled by the custom site definition. But the custom site definition
was not listed down in the source variations dropdown. The solution I found was,
we have to set the FilterCategories="PublishingSiteTemplate" property
for the template in webtemp_ xml file as below.
C:\Program Files\Common Files\Microsoft
Shared\Web Server Extensions\14\TEMPLATE\XML\subwebs.xml
<?xml version="1.0" encoding="utf-8" ?>
<portal xmlns="PortalTemplate.xsd">
<web name="BlankInternet
Site"
siteDefinition="BLANKINTERNET#0"
displayName="BlankInternet
Site"
description="It
has no subwebs" >
</web>
</portal>
C:\Program Files\Common Files\Microsoft
Shared\Web Server Extensions\14\TEMPLATE\1033\XML\webtempSUBWEBS.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- _lcid="1033"
_version="12.0.4518" _dal="1" -->
<!-- _LocalBinding -->
<Templates xmlns:ows="Microsoft SharePoint"> ;
<Template Name="SUBWEBS" ID="84529">
<Configuration
ID="0"
Title="Publishing
Site with no sub webs"
Hidden="FALSE"
ImageUrl="/_layouts/images/officialfile.jpg"
Description="This
template creates a BLANKINTERNET site"
ProvisionAssembly="Microsoft.SharePoint.Publishing,
Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
ProvisionClass="Microsoft.SharePoint.Publishing.PortalProvisioningProvider"
ProvisionData="xml\\subwebs.xml"
DisplayCategory="Custom"
FilterCategories="PublishingSiteTemplate"
VisibilityFeatureDependency="97A2485F-EF4B-401f-9167-FA4FE177C6F6">
</Configuration>
</Template>
</Templates>
Once
done, “Publishing Site with no sub webs” template can be seen in the source variations
dropdown list.
No comments:
Post a Comment