Conditional display based on user role - Fluid Topics - Latest

Conditional Facets in the Search Page

Category
Technical Notes
Audience
public
Version
Latest

In this scenario, the display of a specific metadata key is determined by the user's role (specifically by checking if the user is an ADMIN or CONTENT_PUBLISHER).

This configuration ensures that the facet is hidden for everyone except administrators.

This customization is designed for the classic Search page and not for a designed Search results page.

However, it is easily possible to adapt it for the Search results designer by using a Conditional visibility, and configuring it as follows:

  • Apply when matching: All rules
  • If user role is ADMIN
  • If user role is CONTENT_PUBLISHER