Belangrijke mededeling over deze pagina:

Deze pagina is niet beschikbaar in het Nederlands en daarom wordt de Engelse versie van het artikel getoond. Dit komt vooral voor bij technische artikelen.

I'm happy to introduce our new website, which is based on the Helix conventions and principles. The website is built on Sitecore 8.2 rev. 170407.

For better management and Search Engine Optimization, I of course have added our Url-Rewriter and Seo-Friendly-Url modules. As I was adding the Seo-Friendly-Url module I saw that the following properties are now deprecated:

  • LinkManager.Provider
  • LinkManager.Providers

After inspecting the Sitecore.Kernel.dll, I noticed that LinkManager.Provider is returning LinkManager.ProviderHelper.Value.Provider. This leads me to use:


ServiceLocator.GetRequiredResetableService<Sitecore.Configuration.ProviderHelper<LinkProvider, LinkProviderCollection>>();

So I can get the Provider:


var providerHelper = ServiceLocator.GetRequiredResetableService<Sitecore.Configuration.ProviderHelper<LinkProvider, LinkProviderCollection>>();
var provider = providerHelper?.Value?.Provider;

I can also get the Providers property in the same way:


var providers = providerHelper?.Value?.Providers;

Plaats een reactie