4

Is there any way to have the search results component render links in lowercase? I have patched the linkManager as follows

<linkManager defaultProvider="sitecore">
  <providers>
    <add name="sitecore">
      <patch:attribute name="languageEmbedding">never</patch:attribute>
      <patch:attribute name="lowercaseUrls">true</patch:attribute>
    </add>
  </providers>
</linkManager>

Perhaps the search results link is coming from the index it's not respecting that setting?

Sitecore 9.1.0 SXA 1.8

3

1 Answer 1

6

Many components in SXA use the switchableLinkProvider whether you specify this via the defaultProvider or not. However not all code in SXA uses the switchableLinkProvider directly, some will still use the LinkManager which uses the configured defaultProvider. See here for more details.

The documentation here shows how to change the linkManager provider per site. In this case, simply changing it to "sitecore" should work as it will pick up the values you've patched on the sitecore provider originally.

highlight location

BUT it would be better to change the defaultProvider back to switchableLinkProvider, update the settings you need on the localizedProvider, and update your site to explicitly use the localizedProvider.

1
  • 1
    Note that with this solution, you need to change this on all your SXA sites.. otherwise you should patch the localizedProvider.
    – Gatogordo
    Feb 6, 2019 at 9:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.