Monday, November 5, 2018

Override SXA Environment Site Resolver

In this very short post I demonstrate how to override the EnvironmentSiteResolver included with SXA to remove the use of fast queries.

This was tested on Sitecore 8.2.7 and SXA 1.7.0. Most of this is copied from the SXA library Sitecore.XA.Foundation.Multisite. I changed ResolveAllSites to call the local function GetContentItemsOfTemplate instead of the extension method. Then GetContentItemsOfTemplate calls the link database for items.

Thank you to my friend Corey Smith for his help in cleaning up the copy/paste mess that was in my initial version.

No comments:

Post a Comment