We're using SharePoint 2007 and we've got some custom publishing features that deploy master pages, content types, page layouts, lists and other resources.

For the most part it all works well but there is one thing that I just can't work out. Whenever I create a new site, the default.aspx page is of the "Page" content type, meaning that the extra fields defined in our custom content type are not associated with the item, and as a result are not editable by users.

We have one feature that deploys each of the Page Layouts, and they all go into the master page gallery correctly, with the right "associated content type". Here's an extract:

<File Url="CustomHomePage.aspx" Type="GhostableInLibrary">
<Property Name="Title" Value="Custom Home Page" />
<Property Name="MasterPageDescription" Value="Custom Home Page Layout" />
<Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;" />
<Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLeft.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLeft.png" /> 
<Property Name="PublishingAssociatedContentType" Value=";#CustomContentType;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF39004E8CECE32A7B4bb6A282DD344E9FB871;#"/>

Within the custom publishing feature's onet.xml we have configurations defined which call out to modules like this:

<Module Name="CustomHomePage" Url="$Resources:cmscore,List_Pages_UrlName;" Path="">
<File Url="default.aspx" Type="GhostableInLibrary" Level="Draft" >
<Property Name="Title" Value="$Resources:cmscore,IPPT_HomeWelcomePage_Title;" />
<Property Name="PublishingPageLayout" Value="~SiteCollection/_catalogs/masterpage/CustomHomePage.aspx" />
<Property Name="ContentType" Value="CustomContentType" />
<Property Name="PublishingAssociatedContentType" Value=";#CustomContentType;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF39004E8CECE32A7B4bb6A282DD344E9FB871;#"/>

It also

<ContentTypeBinding ContentTypeId="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF39004E8CECE32A7B4bb6A282DD344E9FB871" ListUrl="$Resources:cmscore,List_Pages_UrlName;" />

But whenever I create a new site based on this configuration, the default.aspx page uses the right page layout but remains just "Page" content type. The custom page layout is associated with the custom content type.

Is it possible using SharePoint 2007 to make the default.aspx page use a custom content type in addition to a specified page layout? If so what am I doing wrong?

1 Answer 1


Try defining the ContentTypeBinding in the same Elements-File as the CustomHomePage-Module and put it on top of all other modules. Further you do not need to define the property PublishingAssociatedContentType in the CustomHomePage-Module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.