Drupal preprocess slideshow

Snippet w pliku template.php do stworzenia w widoku slideshow pojemnika łączącego kilka pól.

function zen_preprocess_views_view_fields(&$vars, $hook){
  if ($vars['view']->name == 'slideshow') {
    $vars['fields']['field_zdjecia_data']->wrapper_prefix = '<div class="slideshow-content-wrapper">' . $vars['fields']['field_zdjecia_data']->wrapper_prefix;
    $vars['fields']['field_zdjecia_data2']->wrapper_suffix .= '</div>';
  }
}