I have created a view which displays the fields of different node types. Therefore, visually, the user will see apple fields bunched together and orange fields bunched together, and the page makes sense.
However, for each view row, a div is created for EVERY field in the view, orange or apple. For particular reasons, I need to be able to get rid of the divs which don't apply to that row.
I would imagine doing something like:
if($row->_field_data['nid']['entity']->type == '[node-type]'):
but I can't figure out which template to do this in. I tried in views-view-unformatted.tpl.php and views-view.tpl.php, and in views-view-fields.tpl.php (which are the outer wrappers) but none seemed to do it.
I thought it would be in views-view-fields.tpl.php, but when I tried inserting this into the (overriding) template
drupal_set_message("wrapper-prefix:" . $field->wrapper_prefix . " wrapper-label:" . $field->label_html . " wrapper-content:" . $field->content . " wrapper-suffix:" . $field->wrapper_suffix);
the only thing which came back with info was $field->content