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.
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.
To resolve an internally formatted URL like that into a friendly URL, you can get an instance of UrlResolver (from EPiServer.Web.Routing) and call GetUrl() like this:
var friendlyUrl = EPiServer.Web.Routing.UrlResolver.Current.GetUrl(myLinkItem.Href);
How can i get the actual link from LinkItem.Href? The Href looks something like this:
~/link/ca38f5e6e7a644e596a605e9e7e3d871.aspx
But i want it to be like this:
/Extranat/Idmanualer/Bil/Alfa-Romeo/
If i use @Html.PageLink i get the correct url like above. But it creates an <a> tag with the title from the LinkItem that is clickable with the right url. I only want it to output the url.