0

I have several File (File Entity) and Content (nodes) types both referencing the same Topic taxonomy using the same field (one field, reused). The contents of these files/content are indexed in the same index using Search API (multi-type index). I also have a view that lists down the contents of that index, showing a mixed list of files and content.

Now what I'd like to do is filter the results by the Topic taxonomy using only one dropdown filter, e.g. If I want to find files and content related to "Science", I would just select "Science" from the Topic filter, and the view will show all the files and content related to "Science".

The problem is that when I add a filter to the view, Drupal presents two filter options for Topic, one for the Topic field on the File entity and another for the Topic field on the Content entity - not just one filter. I've already tried Combined Filters, but that doesn't give me a dropdown of Topics. Also hit a dead end on Search API aggregated fields.

How does one filter a view of both files and content by just one taxonomy filter?

2
  • Are both CTs using the exact same reference Field? Same machine name? The kind you get when reusing an existing field when creating a new one in CT?
    – prkos
    Commented Nov 25, 2020 at 18:40
  • @prkos Yup, the file types and content types are all using the same exact field (the taxonomy term field was created once and reused on the other types). Would have been easy if it were just one entity types (like just content types). But I have file types (File Entity) in the mix.
    – Joseph
    Commented Nov 25, 2020 at 18:48

0

Your Answer

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

Browse other questions tagged or ask your own question.