I have created a new Module in which I store all my custom pagelayouts and register them in the XML file like so:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="CustomPagelayouts" Url="_catalogs/masterpage">
<File Path="drDefault.aspx" Url="drDefault.aspx" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE">
      <Property Name="Title" Value="(DR) Default page" />
      <Property Name="PublishingAssociatedContentType" Value=";#$Resources:cmscore,contenttype_welcomepage_name;;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390064DEA0F50FC8C147B0B6EA0636C4A7D4;#"/>

When I try to activate the my feature which contains this module I get an error telling me that the path to the above pagelayout could not be found.

I've checked that my syntax is correct, I've checked that the Property Names exists and I've also checked that the contenttype ID is valid, but still it throws me that error.

Does anyone have an idea of might be wrong here?

1 Answer 1


I'll bet that the drDefault.aspx is in a folder below the Feature folder. The Elements.xml files are parsed at the same level of the Feature.xml file, regardless of what folder they're in.

To get round this, ensure that the Path parameter is relative to the Feature.xml file.

Your Answer

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