Hi, How would you update our 7.5 code which is:
public string UrlToPage(PageReference pageLink) { return new UrlResolver().GetUrl(pageLink, ContentLanguage.PreferredCulture.Name); }
To work in Episerver 8 as UrlResolver is now abstract?Jon
How about the following:
var urlResolver = ServiceLocator.Current.GetInstance<UrlResolver>(); var url = urlResolver.GetUrl(pageLink, ContentLanguage.PreferredCulture.Name);
??
Without any furtuer investigation I have used your second aproach since version 7 was released.
Hi, How would you update our 7.5 code which is:
To work in Episerver 8 as UrlResolver is now abstract?
Jon