volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Setting ListinContainer to "same page"

Is there a simple way to set ListingContainer on a newly created page to point to itself? Or do I have to save the page first, then change the ListingContainer, then publish the page? The following does not work correctly: EPiServer.Core.PageData newPage = Global.EPDataFactory.GetDefaultPageData(parentPage.PageLink, 3); newPage.PageName = "New listing page"; newPage["ListingContainer"] = newPage.PageLink; PageReference newPageRef = EPiServer.Global.EPDataFactory.Save(newPage, EPiServer.DataAccess.SaveAction.Publish);
#12469
Dec 08, 2005 15:17
Hi! Use the static member SelfReference property of PageReference for this: newPage.PageName = "New listing page"; newPage["ListingContainer"] = PageReference.SelfReference; Regards, Johan Olofsson Developer ElektroPost
#14322
Dec 09, 2005 9:56
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.