I am creating a page through the core service.
I want to add component presentations to it.
I have created the page like this:
var page = new Tridion.ContentManager.CoreService.Client.PageData
{
Title = "pagecore",
FileName = "pagecore",
Id = "tcm:0-0-0",
LocationInfo = new LocationInfo
{
OrganizationalItem = new LinkToOrganizationalItemData { IdRef = "tcm:9-44-4" }
},
IsPageTemplateInherited= false,
PageTemplate=new LinkToPageTemplateData { IdRef = "tcm:9-545-128" },
}
I am unable to add component presentations to it.
Can any one tell me how to add the component presentations?
Thank you.
You need to set collection of
ComponentPresentationDataobjects toComponentPresentationsproperty ofPageData, like this: