: Regardless of whether or not an item has any aliases, you will most likely need the canonical URL of the context item anyway; Therefore, the solution is even simpler: var options = LinkManager.GetDefaultUrlOptions();
Regardless of whether or not an item has any aliases, you will most likely need the canonical URL of the context item anyway; Therefore, the solution is even simpler:
var options = LinkManager.GetDefaultUrlOptions();
options.AlwaysIncludeServerUrl = true;
canonicalLiteral.Text =
Sitecore.Links.LinkManager.GetItemUrl(Sitecore.Context.Item, options);
More posts by @Heady270
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.