Views: Show either field a or field b I'm trying to find a way to get a view to display either field_a or field_b.
For example I have to different image fields that are being rendered differently on the full  node display, both of which are optional. Now I'd like to be able to show one of those pictures in my list view, either picture 1, or, if that's not present, picture 2, but never both.

Is there any smarter way to achieve this than to put the logic into a views fields template?
put the logic into a views fields template


If it's a "one-off", most of the time, that's the way I would have gone about it. Display the "primary" field, exclude the seconday. Template the primary to display the second as necessary.

At a recent project, I "was just going to do this once", but then the client started changing their mind, and now I have a really big mess of views templates. If I knew that I would have a lot of logic like this, I would use a Views Context display instead, pull that into Panels, and have the Page manager handle the display logic instead. More complicated, but also neater IMO, and easier to maintain, as the logic becomes independent of the presentation.