function template_preprocess_views_view_fractionslider in Views FractionSlider 7.2
Same name and namespace in other branches
- 7 views_fractionslider.module \template_preprocess_views_view_fractionslider()
Implements hook_preprocess().
File
- views/
views_fractionslider.module, line 21 - Provide an fractionslider display style for Views.
Code
function template_preprocess_views_view_fractionslider(&$variables) {
$view = $variables['view'];
$options = $view->style_plugin->options;
$variables['viewname'] = $view->name;
$variables['class'] = $options['class'];
$variables['pager'] = $options['pager'];
$variables['controls'] = $options['controls'];
$variables['views_dimensions'] = $options['views_dimensions'];
$variables['views_fullwidth'] = $options['views_fullwidth'];
$variables['views_responsive'] = $options['views_responsive'];
$variables['views_increase'] = $options['views_increase'];
libraries_load('fractionslider');
drupal_add_js(array(
'viewsfractionslider' => array(
'controls' => $variables['controls'],
'pager' => $variables['pager'],
'dimensions' => $variables['views_dimensions'],
'fullwidth' => $variables['views_fullwidth'],
'responsive' => $variables['views_responsive'],
'increase' => $variables['views_increase'],
),
), 'setting');
}