of course in the Sitecore.config file there was an encode name replacement to replace all dashes in URLs with spaces.
<replace mode="on" find=" " replaceWith="-"/>However the results weren't showing until the EncodeNames element was set in the UrlOptions when generating the link with the link manager.
itemUrl = Sitecore.Links.LinkManager.GetItemUrl(item, new UrlOptions { AlwaysIncludeServerUrl = true, LanguageEmbedding = LanguageEmbedding.Never, EncodeNames = true});
No comments:
Post a Comment