diff --git a/src/Feature/Sitecore.Feature.PublishedPageUrl/Pipelines/PublishedPageUrl.cs b/src/Feature/Sitecore.Feature.PublishedPageUrl/Pipelines/PublishedPageUrl.cs index 913aaeb..b33119b 100644 --- a/src/Feature/Sitecore.Feature.PublishedPageUrl/Pipelines/PublishedPageUrl.cs +++ b/src/Feature/Sitecore.Feature.PublishedPageUrl/Pipelines/PublishedPageUrl.cs @@ -87,7 +87,10 @@ public void Process(RenderContentEditorArgs args) options.AlwaysIncludeServerUrl = false; options.SiteResolving = true; - url += LinkManager.GetItemUrl(editingItem, options).ToLowerInvariant(); + var path = LinkManager.GetItemUrl(editingItem, options).ToLowerInvariant(); + path = path.Replace(url, "").Replace(":443", "").Replace(":80", ""); + + url += path; } } @@ -179,11 +182,11 @@ private SiteContext GetSiteContext(Item item) return Factory.GetSite(siteName); } - catch(Exception ex) + catch (Exception ex) { Log.Error($"Sitecore.Feature.PublishedPageUrl.Pipelines.ShowPublishedPageUrl.GetSiteContext -> {ex}", this); } - return null; + return null; } } } \ No newline at end of file