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!

Setting ListinContainer to "same page"

Vote:
0
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
Vote:
0
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.