2

I had an existing feature that deployed a Page Layout. I ended up adding another Page Layout to the feature and I updated my Elements.xml file to include the reference to the new file:

  <File Url="MNCRFPPage.aspx" Type="GhostableInLibrary" IgnoreIfAlreadyExists="true">
    <Property Name="Title" Value="MNC RFP Page" />
    <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;" />
    <Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/DefaultPageLayout.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/DefaultPageLayout.png" />
    <Property Name="PublishingAssociatedContentType" Value=";#MNC RFP Site Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007A48130EC3DB064584E219954237AF3987686902DCEDA048E5B29BDA9E09CD73FD006B86C4A7F5F7EE489F15C53271E48D84;#"/>
  </File>

If I go to my 14 hive after deploying I see the new file and the updated Elements.xml file, but for some reason when I go to Site Settings->Galleries->Master pages and page layouts it's not showing up.

Am I missing a step here? Can anyone think of a reason that this file would not be showing up in the Page Layouts gallery?

3
  • 1
    Should work.. Did you activate feature? Feb 2, 2012 at 0:56
  • Did you deploy it for this particular site? Did you check for the file in SP Designer?
    – Deepu Nair
    Feb 2, 2012 at 5:37
  • Yes it is activated. I deployed to a specific site, but have not checked with SP Designer. Feb 2, 2012 at 15:54

3 Answers 3

1

I hope you use module for deploying pagelayouts. have u mentioned the path like below

<Module Name="MasterPagesGallery" Url="_catalogs/masterpage">

and also i believe you have deactivated and activated the feature after deploying

1
  • Yep, looks like I just needed to deactivate and reactivate... Feb 2, 2012 at 16:14
1

Please make sure to include File in Module element as shown below:

<Module Name="MasterPages" 
          Url="_catalogs/masterpage" 
          Path="PageLayouts"
          RootWebOnly="TRUE">

    <File Url="Test.aspx" 
              Type="GhostableInLibrary">

      <Property Name="Title" Value="Home page" />
      <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;" />
      <Property Name="PublishingAssociatedContentType" Value=";#$Resources:SE_OSU_ResourcesContentTypes,ctype_homepage_name;;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390028F91F325164A04A99A6579038281757004EB0B00A3F7C9847B809A3D61B8C7499;#" />
    </File>
 </Module>
1
  • Yes, it is in the Module Feb 2, 2012 at 15:54
1

I also added ReplaceContent="True" to each file element to overwrite the previous installed version.

For example:

<File Url="Communications/iNewsArticle.aspx" Type="GhostableInLibrary" IgnoreIfAlreadyExists="true" ReplaceContent="true">

Your Answer

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

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