M
M
maiskiykot2019-09-10 21:24:47
Drupal
maiskiykot, 2019-09-10 21:24:47

How to remove view fields from Drupal 7 output?

I suddenly ran into a problem. It was necessary to hide fields without data from the output and nothing takes them. Tried all the hooks, tried the views-field template to edit - zero emotion. Hence the question: how to remove empty lines from the output along with the label? Tips to insert hide($content[$field]) already tried everything. Something more robust is needed.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
maiskiykot, 2019-09-18
@maiskiykot

The problem was that I used a tabular view view, and the fields are not hidden in it. I had to switch to an unformatted list and theme the template.

A
afi13, 2019-09-11
@afi13

Try enabling 'Hide if empty' in No results behavior in field settings.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question