Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Hi
We are using Episerver DXC for one of our project. The links to navigation menu item are like : "/products/product1" but after after deployment to Episerver DXC environment links become like
"/EPiServer/CMS/Content/products/product1,,963/?epieditmode=False". But after few minutes URL become user friendly.
for converting EPiserver links to user friendly url we are using below code
public static XhtmlString ToExternalLinks(this XhtmlString xhtmlString)
{
var result = new StringBuilder();
foreach (var fragment in xhtmlString.Fragments)
{
var urlFragment = fragment as UrlFragment;
result.Append(urlFragment != null ? UrlResolver.Current.GetUrl(new UrlBuilder(urlFragment.InternalFormat), ContextMode.Default) : fragment.InternalFormat);
}
return new XhtmlString(result.ToString());
}
reference: http://antecknat.se/blog/2016/03/07/xhtmlstring-render-blocks-and-convert-link-to-external-without-htmlhelper/
Any reason why links after deployment not working as expected. Surprsingly after few minutes links starts working.
Thanks in advance
-Avin