Wednesday, May 21, 2008

PublishingFeatureHandler

Feature ID 22A9EF51-737B-4ff2-9346-694633FE4416

In lack of documentation on this feature and the properties it contains, I did some reflection on the class. But the inner workings of the class is obfuscated and therefore I was only able to get the properties declared as constants. I have not tested all of the properties, so I actually do not know if they will work.

Properties in the PublishingFeatureHandler feature that you are enable to set in the ONET.XML

Like this...

<!-- Publishing feature -->
<Feature ID="22A9EF51-737B-4ff2-9346-694633FE4416">
<Properties xmlns="http://schemas.microsoft.com/sharepoint/">
<Property Key="WelcomePageUrl" Value="$Resources:cmscore,List_Pages_UrlName;/Default.aspx" />
<Property Key="PagesListUrl" Value=""/>
<Property Key="AvailableWebTemplates" Value=""/>
<Property Key="AvailablePageLayouts" Value=""/>
<Property Key="SimplePublishing" Value="true" />
...
</Properties>
</Feature>

PublishingFeatureHandler properties

NameTypeDefault value Simple publishingDefault value Complex publishingDescription
AlternateCssUrlstringnullnull

Add the css file to the application pages resided in the layouts folder.
Syntax format: ~SiteCollection/Style Library/mycustom.css

AvailablePageLayoutsstringnullnull

Syntax format: ~SiteCollection/<pagelayout path1>:~SiteCollection/<pagelayout path2>:~SiteCollection/<pagelayout path3>Example..:
~SiteCollection/_catalogs/masterpage/mypage1.aspx: ~SiteCollection/_catalogs/masterpage/mypage2.aspx: ~SiteCollection/_catalogs/masterpage/mypage3.aspx
Use the : colon as the separator.

AvailableWebTemplatesstringnullnull

AvailableWebTemplates Key Format is:LCID-[sitetemplatename][#sitetemplatenumber];LCID-[sitetemplatename][#sitetemplatenumber];LCID-[sitetemplatename][#sitetemplatenumber]
Example: 1033-BLANKINTERNET#1;1049- BLANKINTERNET #1;*- BLANKINTERNET #2;*-BLANKINTERNET#2

ChromeMasterUrlstringnullnullSyntax format:
~SiteCollection/_catalogs/masterpage/mycustom.master
EnableApprovalWorkflowOnDocumentsboolfalsetrue
EnableApprovalWorkflowOnImagesboolfalsetrue
EnableApprovalWorkflowOnPagesboolfalsetrue
EnableModerationOnDocumentsboolfalsetrue
EnableModerationOnImagesboolfalsetrue
EnableModerationOnPagesboolfalsetrue
EnableSchedulingOnDocumentsboolfalsetrue
EnableSchedulingOnImagesboolfalsetrue
EnableSchedulingOnPagesboolfalsetrue
MigrationOverrideboolfalsefalse
PagesListUrlstringnullnull
RequireCheckoutOnDocumentsboolfalsetrue
RequireCheckoutOnImagesboolfalsetrue
RequireCheckoutOnPagesboolfalsetrue
SimplePublishingboolIf not defined, the default value is true. Specifies the setup with simple or complex publishing configurations.

VersioningOnDocuments

VersioningSettingsMajorMajorAndMinor

Possible values for VersioningSettings is: Major, MajorAndMinor, None

VersioningOnImagesVersioningSettingsMajorMajorAndMinor
VersioningOnPagesVersioningSettingsMajorAndMinorMajorAndMinor
WelcomePageUrlstringnullnull

Defines the page that will act as the startup page.

Example: $Resources:cmscore,List_Pages_UrlName;/default.aspx