I have a view that shows nodes and groups them by their taxonomy term. Is it possible to show less fields for a specific term? For example there are user profiles with names and pictures that are listed, but if they have a specific taxonomy term the picture field shall not be shown.
These types of problems are often solved by creating another Views display.
- Add a Filter to your original Views to only show the results with the terms where you want to show the additional fields.
- Then Duplicate this display as Attachment, attach it to the original views display.
- Override the Attachment Filters and change the one for the terms - reverse the choices to filter out only the terms where you don't want additional fields
- Override the Attachment Fields, remove the ones you don't want.
The Attachment results will display below or above the original results, depending on whether you choose to attach it After or Before.
Try preprocessing the views field.
Something like this is a good starting place: https://drupal.stackexchange.com/a/36712/80164
Note that if you only need to preprocess a certain field, the function to use is