Reputation: 437
I've created an alias (basically a virtual (or alternative) path in Sitecore) for an item that was also re-named. My custom redirect handler is then determining the item ID for the old link correctly.
But when I call LinkManager.GetItemUrl(item, urlOptions)
the resulting URL is for the alias, not the actual Sitecore item that exists in the content tree.
Is this Sitecore's default behavior for LinkManager.GetItemURL()
to resolve to an item's alias, if one exists?
Upvotes: 2
Views: 1036
Reputation: 31435
Here's a possibly related question with a solution.
Can you ensure you're not using a custom LinkProvider
, e.g. the custom LinkProvider on the shared source? If you are using that, part of its behavior is to apply aliases for item links.
Another thing would be to look at your HTML output caching and ensure that's not the issue (as referenced in the above link for the other question).
Also, what version of Sitecore are you using?
Upvotes: 2