Hey guys we have a multi site setup, when we open horizon it does not open the correct site. Does anyone know where we can set the default site for horizon in sitecore 10.2?
1 Answer
If you are asking about clicking on the icon on Launchpad:
- Open
/sitecore/client/Applications/Launchpad/PageSettings/Buttons/ContentEditing/Horizon
item incore
database - There is
PathResolver
field (that has valueSitecore.Horizon.Integration.LaunchPad.HorizonHostResolver, Sitecore.Horizon.Integration
) - You can override this class and assembly to yours
The default logic of getting Horizon site looks in this way:
public virtual string Execute()
{
string clientHost = _settings.Horizon().ClientHost;
string clientHostStartPage = _settings.Horizon().ClientHostStartPage;
string text = clientHost + clientHostStartPage;
string text2 = _sitecoreContextHelper.Context.HttpContext?.Request.Url?.Host;
string text3 = ((text2 != null) ? _siteManager.TryBestMatchClientSiteByHost(text2) : null);
if (text3 != null)
{
return text + "?sc_site=" + text3;
}
return text;
}
-
Will it be able to set the required site in the Site DropDown at the top of the panel on Horizon Window? Commented Oct 5, 2022 at 16:00
-
Yes, you still will have that dropdown. You will set only the initial site.– AntonCommented Oct 5, 2022 at 20:19