AI OnAI Off
newPage.LanguageID = "SV";
newPage.PageName = "-";
pageRef = EPiServer.Global.EPDataFactory.Save (newPage, EPiServer.DataAccess.SaveAction.Save);
pageRef.LoadRawPageData = true;
newPage = EPiServer.Global.EPDataFactory.GetPage (pageRef);
PropertyData pageProp;
for (int i = 0; i < myProperties.Count; i++)
{
pageProp = (PropertyData) myProperties[i];
if (newPage.Property.Exists (pageProp.Name))
{
newPage.Property[pageProp.Name].Value = pageProp.Value;
}
}
EPiServer.Global.EPDataFactory.Save (newPage, EPiServer.DataAccess.SaveAction.Save);
//myParentPage is the id of the page parent //myPageTypeName is the name of the page type for the new page EPiServer.Core.PageData newPage = Global.EPDataFactory.GetDefaultPageData(myParentPage, myPageTypeName); newPage.LanguageID = "SV"; newPage.PageName = "-"; PropertyData pageProp; //myProperties is an array with the PropertyData for (int i = 0; i < myProperties.Count; i++) { pageProp = (PropertyData) myProperties[i]; if (newPage.Property.Exists (pageProp.Name)) { newPage.Property[pageProp.Name].Value = pageProp.Value; } } EPiServer.Global.EPDataFactory.Save (newPage, EPiServer.DataAccess.SaveAction.Save); return true;