You are here

function template_preprocess_views_bootstrap_grid_plugin_style in Views Bootstrap 7.2

Same name and namespace in other branches
  1. 7.3 templates/grid/theme.inc \template_preprocess_views_bootstrap_grid_plugin_style()

Implementation of template preprocess for the view.

File

templates/grid/theme.inc, line 6

Code

function template_preprocess_views_bootstrap_grid_plugin_style(&$vars) {
  $view = $vars['view'];
  $options = $view->style_plugin->options;
  $horizontal = $options['alignment'] === 'horizontal';
  $columns = $options['columns'];

  // Split items by rows and columns.
  $vars['items'] = _views_bootstrap_split_rows($vars, $columns, $horizontal);
  $vars['column_type'] = 12 / $columns;
}