Using Custom Content Type in Site Definition?

20 pts.
Tags:
MOSS
MOSS custom content type
MOSS page layout
MOSS site definition
ONET.XML
SharePoint
Hello, Normally when you create a new publishing site in MOSS it automatically gets a default page created using the WelcomeLinks.aspx page layout. But I have changed this behavior like below and created a page based on custom content type and page layout of my choice. Inside ONET.XML file, there is a modules section (as below), it defines the PublishingPageLayout and ContentType to be used when a site is created. <Modules> <Module Name=”Home” 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/MyPageLayout.aspx, ~SiteCollection/_catalogs /masterpage/MyPageLayout.aspx” /> <Property Name=”ContentType” Value=”MyContentType” /> <Property Name=”PublishingAssociatedContentType” Value=”;#MyContentType;#0×010100C568…3A09F31E1FBA;#” /> </File> </Module> </Modules> But my custom content type doesn't work(apply) for available page layout first time, when I create new site collection by selecting custom site template. It works fine, when I create new page by selecting my page layout with custom content type. Does anyone has any idea why it behaves strange in my case. Thanks for your help in advance. Regards, Satyam AMIN
ASKED: October 20, 2008  12:13 PM
UPDATED: October 20, 2008  3:23 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Finally I found the solution what I was looking for. Simply I need to create one more feature which binds my custom content type with pages and added this feature in site definition under web feature tag.

For more information about my issue and solution, go through following URL.

1) http://wcornwill.wordpress.com/2007/03/29/change-the-default-page-when-site-is-created/

2) http://katriendg.com/aboutdotnet/2007-5-1-publishing-web-syntax-onet-xml.aspx

3) http://www.sharepointblogs.com/tonstegeman/archive/2007/07/23/associating-the-default-page-in-a-sharepoint-2007-publishing-site-with-a-custom-content-type-and-a-custom-page-layout.aspx

4) http://www.sharepointblogs.com/tommysegoro/archive/2008/09/14/sharepoint-solution-syntax.aspx

Regards,
Satyam AMIN

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following