Question

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" ...?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top