Views - conditions, filters - how to display only one field

by sailormoon   Last Updated August 14, 2019 08:07 AM

I have a view which displays nodes of content type "news", which has two fields: f_one and f_two. What I want is:

If f_one has content and f_two is empty, I want to display only f_one.
If f_one is empty and f_two has content, I want to display only f_two.

^ ok, that's easy: I just click this both fields in my view settings to display it. When any of them has content they are displaying. But what if:

If f_one has content and f_two has content, I want to display only f_one.

How can I do it? In this way both fields are displaying, but I want only f_one. I guess.. with filters? But I don't know why. Or some global variables? Please help.

Tags : views 8


Related Questions


Alter the moderation state in the Content view Drupal 8

Updated February 28, 2018 21:07 PM


Group items in Views by value in Field Collection

Updated July 20, 2015 13:03 PM

List of referenced entities appended to a node

Updated January 12, 2017 08:03 AM