Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to create page Layout(Templete id ,Content id and widget id is available) using Ektron Api.I want to insert Content in dropzone id 1 and widget in dropzone id 2. Please provide me code. Thanks for help.
Posted
Comments
CHill60 17-Dec-12 11:13am    
Have you tried http://dev.ektron.com/tutorials.aspx
pallav agarwal 18-Dec-12 6:17am    
Thanks for your reply @Chill60.I have read this article and implement a code
PageModel pageModel = new PageModel();
PageData pageData = new PageData();
pageModel.Get(2, out pageData, false);
WidgetData widget = new Ektron.Cms.PageBuilder.WidgetData();

widget.ControlURL = "ContentBlock.ascx";
widget.ID = 27; // For content block

// You also need to set other properties like Settings, DropID, ColumnID

pageData.Widgets.Add(widget);
pageModel.CheckOut(pageData);
pageModel.Publish(pageData);

But I am getting error "com:user does not have permission";

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900