Site Specific Link Manager (Part 2) – Sitecore 8.2 Dependency Injection Support
I previously blogged about a Switching Link Provider for Sitecore, allowing you use a different LinkProvider for different sites.
There were a number of changes in Sitecore 8.2 to LinkManager/Provider as a result of the Dependency Injection changes, unfortunately one of them being the Providers
collection being marked [Obsolete]
. The code in the old post should still work, but you’ll get that annoying warning.
The previous code worked by creating a Link Provider which acted as a switcher that in turn called a different Provider. This was a hack because we could not switch out the Link Manager itself. Well the DI changes in Sitecore 8.2 allow us to do that instead and provide our own implementation of LinkManager instead.