5

I'm following the creating a page layout in this example
http://blog.beckybertram.com/Lists/Posts/Post.aspx?ID=71

It adds a page layout using this xml,

<File Path="masterpage\MyCustomPageLayout.aspx" Url="MyCustomPageLayout.aspx" Type="GhostableInLibrary">
      <Property Name="Title" Value="My Custom Page Layout" />
      <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;" />
      <Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/CustomPageLayout.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/CustomPageLayout.png" />
      <Property Name="PublishingAssociatedContentType" Value=";#$Resources:cmscore,contenttype_articlepage_name;;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D;#" />
</File>

I've created my own content type based on the Welcome Page, I want to associate this page layout with, how do I find the GUID of this content type to put in this property <Property Name="PublishingAssociatedContentType" ...?

  • Have you created your content type by code or xml declaration in a feature (or, forbid, in the SharePoint UI)? – user2450 Apr 29 '11 at 4:56
  • I was struggling to find out how to do this !!! Finally got it Helpful !!! – Bijay Kumar Nov 18 '11 at 5:58
10

I assume you created your content type through the browser, because if you created it through Visual Studio you would have the guid that you used in the definition.

You can get the guid by navigating to the content type (Site Actions > Site Settings > Site content types). When you click on your content type, the url will look something like: http://server/_layouts/ManageContentType.aspx?ctype=0x010100XXXXXXXXXXXXX

That query parameter is the guid.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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