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: 2507

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"
$Resources:core,Culture;/Preview Images/MyPreview.png,
Images/MyPreview.png" />
<Property Name="PublishingAssociatedContentType"
Value=";#My Layout Content



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

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