I’ve been using this Site Specific Link Provider for a while now and have been meaning to blog it for some time, a couple of recent blog posts from John West and the addition of the new LinkProviderSwitcher to Sitecore 8 about prompted me to finally get my thoughts onto keyboard. When I read that a new LinkProviderSwitcher had been provided I got a bit excited that we may finally have site specific link provider, alas it was just a way of allowing us to switch the provider inside a using block.
Some of you may be aware that Sitecore has allowed us to define multiple Link Providers for some time, we just add multiple
providers to the
linkManager config section, but it hasn’t really provided us a nice way of utilizing that functionality without hard-coding it: