_links.site.href has incorrect URL in resourceapi

Hi everyone,

Our website is using React as the frontend and call Bloomreach’s resourceapi to get the JSON objects. So I guess we are using SPA with Bloomreach’s Page Model. We are using Bloomreach 14.5.

For each content document, there is a _links attribute. We are trying to use _links.site.href of the main content document of that page to build the canonicalUrl. However, _links.site.href for that document isn’t correct. It’s pointed to a sub page that also uses the same document.

So for example, we have a Retailer document that is the main document for the Retailer page. The Retailer’s _links.site.href has the URL of “retailer/designer” instead of just “retailer”.

How does the _links.site.href get generated? And can we change it?

Thanks,

Billy

According to

The HST find the most suited canonical URL for the content document by using org.hippoecm.hst.core.linking.LocationMapResolver.java

Is there a way we can override and have our own LocationMapResolver for a particular content document?

Thanks,

Billy