London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
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;