We are using Sitecore SXA 1.7.1.
The checkbox 'Language Embedding
' is set to false for one of our SXA sites and all the site url's are rendering without language code. But, in the sitemap -provided by SXA- all the url's contain the language 'en' which we want to avoid.
We raised a Sitecore support ticket on this but didn't get any reponse yet. Is there a way to get this working in Sitemap as well?
Update:
protected virtual UrlOptions GetUrlOptions()
{
UrlOptions defaultUrlOptions = LinkManager.GetDefaultUrlOptions();
defaultUrlOptions.Site = this.Context.Site;
defaultUrlOptions.AlwaysIncludeServerUrl = false;
defaultUrlOptions.SiteResolving = true;
return defaultUrlOptions;
}