Change function view_unformatted to work with format HTML list I have function in template.php which check if image fields exists (has content) and it adds classes if image exists (has_field) and if image does not exist (has_no_field).

This function now works with Unformatted format, but I need it to work with HTML list format. I already tried it with function theme_views_pre_render(&amp;$view) but could not get it to work.

function theme_preprocess_views_view_unformatted(&amp;$vars) {
  $view = $vars['view'];
  $rows = $vars['rows'];

  foreach ($vars['view']-&gt;result as $id =&gt; $row) {

    if (!empty($row-&gt;field_field_image) || !empty($row-&gt;field_field_image_2) || !empty($row-&gt;field_field_image_3)) {
      $vars['classes_array'][$id] .= ' has_field';
    }  
    else {
      $vars['classes_array'][$id] .= ' has_no_field';
    }
  }

}


How to make this work with HTML list format?
I think the hook name you are looking for is template_preprocess_views_view_list that applies to HTML list views.