I have created a view that will show product attributes. I have selected the 'Hide if empty' option so the field will not show if it has no value. However this does not work using the table style.

Can anyone suggest the best way to achieve this?

Comments

ndf’s picture

The table style renders row by row and therefore doesn't take account of empty columns.

stjepano made a nice solution to remove column headers for columns that do not have content:
Use preprocessing function

imalabya’s picture

If it a table view then you can select the HIDE EMPTY COLUMN option in the table format settings for the fields.

usmanjutt84’s picture

Works for me