Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Getting custom layout pages into the masterpage gallery via onet.xml

  Asked By: Traci    Date: Mar 20    Category: Sharepoint    Views: 2536

I have a custom Page Layout .aspx page (for a custom publishing site)
that I'd like to automatically have put into the MasterPage gallery.

I think I can do this as a feature, but is it possible to do it as
part of site provisioning via the onet.xml file?

Right now I have it in the <Modules> section as it's own module, and
it looks similar to the following, but it doesn't seem to work:
<Module Name="MyLayout" List="116" Url="_catalogs/masterpage"
Path="Layouts" RootWebOnly="False">
<File Url="MyLayout.aspx" Type="GhostableInLibrary">
<Property Name="Title" Value="My Layout Page" />
<Property Name="MasterPageDescription" Value="Custom
Layout Page" />
<Property Name="ContentType" Value="My Layout Content
Type" />
<Property Name="PublishingPreviewImage"
Value="~SiteCollection/_catalogs/masterpage/
$Resources:core,Culture;/Preview Images/MyPreview.png,
~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview
Images/MyPreview.png" />
<Property Name="PublishingAssociatedContentType"
Value=";#My Layout Content
Type;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219
954237AF390023CB579DF7E34BC38F3647ADB1D6AD1B;#"/>
</File>
</Module>

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Lizbeth Macdonald     Answered On: Mar 20

You should be able to add it through the ONET.xml. Two potential
issues.



1) Does the Content Type you reference already exist and is it
loaded into the Gallery as a content type?

2) Are you trying to use the layout  page for the default.aspx page
in the site? I don't think you can deploy it and use it at the same
time.

 




Tagged: