In my previous post, Sitecore links in multisite solutions – SiteResolving, I described a limitation to the LinkManager when having multi-site and multi-language solutions.
The limitations occur in solutions where you have seperate domain names for languages AND having multiple sites at the same time. In this case it’s very hard to get the optimal links when linking between sites.
But from Sitecore 6.4.1 rev. 120113 (6.4.1 Update-6) Sitecore has introduced 2 new settings, allowing you to have more control on how links between sites and languages are created:
<setting name="Rendering.SiteResolvingMatchCurrentSite" value="true" />
If Rendering.SiteResolvingMatchCurrentSite is true, the link provider will check if the target item is located under the start item for the current site before it tries to find a match in the full list of site definitions. This ensures that when the target item can be resolved using the current site, the target link will not change to a different site/hostname.
<setting name="Rendering.SiteResolvingMatchCurrentLanguage" value="true" />
If Rendering.SiteResolvingMatchCurrentLanguage is true, the link provider will take the language attribute of the site definitions into consideration when resolving which site/hostname to use when rendering a cross-site link. This setting is enabled by default.
Thanks to Sitecore support for clarifying this.
Pingback: Sitecore links in multisite solutions – SiteResolving « Brian Pedersen’s Sitecore and .NET Blog
Pingback: Sitecore Links with LinkManager and MediaManager | Brian Pedersen's Sitecore and .NET Blog