search
AI OnAI Off
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.
Hi Dinesh,
Please use this-
EPiServer.Core.ContentReference.StartPage
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));