0

in a view I'm filtering content with search API /facets. In the view (field format) i've applied a specific style for the results, some sort of Bootstrap card. IT apply to all content index by search API.

I need to apply different styles according to content type in the results: For the content type "rose" i use a bootstrap card, for the content type "wood" i use full width div with an image a button and a text.

How can i achieve that?

I tried to duplicate the view with the same path parameter (/search), and tried relation/contextual filter but it s not working. And as the view overwrite the display style of the search API "rendered_item", i cant use those, maybe i should?

1 Answer 1

1

Indeed, in the search API view, i had to change the "format display" from field to rendered entity, and in the parameter i choose a display format for the different content type. then i will customize if trough twig template, instead in the view with custom text as like that it apply to any content type.

Your Answer

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

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