You are here

function template_preprocess_views_isotope in Views Isotope (Deprecated) 7

Preprocess function to build the isotope grid

File

./views_isotope.theme.inc, line 7

Code

function template_preprocess_views_isotope(&$vars) {
  template_preprocess_views_view_list($vars);
  $view = $vars['view'];
  $options = $view->style_plugin->options;
  $handler = $view->style_plugin;
  $fields =& $view->field;
  $rows =& $vars['rows'];
  $vars['attributes'] = array();
  $vars['isotope_id'] = 'views-isotope-' . $view->name . '-' . $view->style_plugin->display->id;

  // Get stylesheets.
  drupal_add_css(drupal_get_path('module', 'views_isotope') . '/views_isotope.css');

  // Add JavaScript files and settings.
  drupal_add_js(libraries_get_path('jquery.isotope') . '/jquery.isotope.min.js');
  drupal_add_js(drupal_get_path('module', 'views_isotope') . '/views_isotope.js');
}