Efficient way to work with facets

Hi everyone!

I have setup faceting on my news, which was fairly easy to setup following the documentation. The sitemapitem for the “/news” had previously the relativecontentpath pointing to my news folder and therefore moving from one country or site to the other was working fine, I could move from /news to /noticias or /nouvelle automatically.

The problem is that now the relativecontentpath is pointing to my “newsfacets” node where the facet tree is stored and hippo is now not able to translate this automatically when moving between channels. I could of course manually handle the news with a custom component that could grab the facets and make my own facet component, but isn’t there a better and default way to work with this?

Thanks!

I’m not sure I understand. You don’t translate facets, you translate content. The facets should be configurable for each content tree. If the sitemap item point to the right path it should work regardless of whether it is a folder or facet.

Hi Jasper, thanks for the response.

When you implement a language selector (usually in the header or footer), you need to check if the actual page is available in other languages. For this you will take the content bean from the request context and then you will take all the available translations for this bean.

This is working fine as long as the relative content path for the sitemap is pointing to the content folder where all the news (or blogs etc) are stored, but when facets are implemented, you need to point to the facets node instead.

My question is, is there a common or default way to get the available translations of a node of type hippofacnav:facetnavigation or do I need to implemenet some custom logic for this? (like getting from the facets node the hippo:docbase property and then check translations etc…

Ah I see. I think you will need custom logic for this.