Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
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.