Monday, March 10, 2008

Can not create page from the list controls

Deployment of content types via feature is bit tricky. Publishing content types for WCM are different in their way. They are special coz lots of publishing elements, such as "Pages" doc lib and page layouts.
When I deployed the content types using the features, I was redirected to "UploadPage.aspx" page, not to "CreatePage.aspx".Coz, I did not mention the "CreatePage.aspx" template pages explicitly. So, you loose the create page functionality when invoked from the list tool bar menu. Any how, CreatePage.aspx will work if created from the 'Actions' menu.
Below is the code to add the reference to "CreatePage.aspx" template explicitly :
ID="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900<GUID>" Name="my Publishing Content Type" Group="my Publishing Content Type" Description="Content Type inherited from Publishing Page" >
<FieldRef ID="{<GUID>}" DisplayName="Title" Name="Title" Sealed="TRUE" />
<FieldRef ID="{<GUID>}" DisplayName="Description" Name="Comments" />
<DocumentTemplate TargetName ="/_layouts/CreatePage.aspx"/>


If you would like to enable this content type to be available only for the specified doc libraries/lists, add the below:
ContentTypeId="LIST TO ENABLE " ListUrl="URL"

No comments:

Post a Comment