AI OnAI Off
Never mind, I found this one. :)
public string FriendlyURL(PageReference PageLink, string URL)
{
var url = new UrlBuilder(URL);
EPiServer.Global.UrlRewriteProvider.ConvertToExternal(url, PageLink, System.Text.UTF8Encoding.UTF8);
return url.Uri.AbsoluteUri;
}
I can't seem to figure out how to print the friendly URL of a page in code behind. I need to be able to render it without adding it to the markup. Has anyone got a function that does this?