Page Creation
...
private PageNode CurrentPage = null;
...
// event handler
PageManager pManager = new PageManager();
int count;
PagesFacade rootPageFacade = App.WorkWith().Pages().Where(pg => pg.Name == "Page1");
CurrentPage = rootPageFacade.Get().First();
App.WorkWith()
.Page()
.CreateNewStandardPage(parentNode)
.Do(p =>
p.Name = pageName;
p.Title = pageName;
p.Description = pageName;
p.DateCreated = DateTime.Now; //filled in automatically, but you can control it programatically as well
//p.UrlName = "page1"; //filled in automatically, but you can set any url name here.
p.ShowInNavigation = true;
)
///.SetTemplateTo(templateGuid)
.SaveChanges();
SiteMapBase.Cache.Flush();
Hello jaime,
The problem you are facing is caused because the object you are trying to edit already belongs to another transaction. Please verify that this object is not checked out by the page manager or you have some other fluent api code not closing its transaction. Proably you are not checking in a page if it has been checked out previously.
Sincerely yours,
Radoslav Georgiev
the Telerik team
Solved with your help
Jaime.
I am having the exact same problem - trying to create a child page programatically, but I dont understand your description of your solution. Would you please post the code?
Thanks
Radoslav solved this problem in another post here.