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!
For 7.5 you should be using IContentRepository instead of DataFactory. And new PageReference(EPiServer.Configuration.Settings.Instance.PageStartId) is now replaced with EPiServer.Web.SiteDefinition. ContentReference.StartPage can also be used as it is equipvalent to SiteDefinition.Current.StartPage by default.
Hi,
I have below code in episerver 6
var startPage = EPiServer.DataFactory.Instance.GetPage(new PageReference(EPiServer.Configuration.Settings.Instance.PageStartId));
How to convert this to episerver 7.5
Please suggest
var startPage =
EPiServer.DataFactory.Instance.GetPage(
new PageReference(EPiServer.Web.SiteDefinition.Current.StartPage));