function template_preprocess_views_view_unformatted__biblio_year in Bibliography Module 6.2
Same name and namespace in other branches
- 6 biblio.views.inc \template_preprocess_views_view_unformatted__biblio_year()
- 7 views/biblio.views.inc \template_preprocess_views_view_unformatted__biblio_year()
Preprocess function for views ....
Parameters
$vars:
File
- views/
biblio.views.inc, line 407 - Functions for views integration for Drupal biblio module.
Code
function template_preprocess_views_view_unformatted__biblio_year(&$vars) {
$view = $vars['view'];
$rows = $vars['rows'];
$vars['classes'] = array();
// Set up striping values.
foreach ($rows as $id => $row) {
$vars['classes'][$id] = 'views-row';
$vars['classes'][$id] .= ' views-row-' . ($id + 1);
$vars['classes'][$id] .= ' views-row-' . ($id % 2 ? 'even' : 'odd');
if ($id == 0) {
$vars['classes'][$id] .= ' views-row-first';
}
}
$vars['classes'][$id] .= ' views-row-last';
}