Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Feb 2010 at 11:37 UTC
Updated:
10 Feb 2010 at 12:25 UTC
For better Theming it would be fine if the table-output inside "views-table" has not only "odd" and "even".
This adds "first" and "even" like in Drupal's Menus:
function basic_preprocess_views_view_table(&$vars) {
$count=count($vars['rows']);
if ($count) {
$vars['row_classes'][0][]='first';
$vars['row_classes'][$count-1][]='last';
}
}
The function resides in your Theme template.php. Change function name according your theme.
Maybe ists possible to include this code in function template_preprocess_views_view_table(&$vars) inside views/theme/theme.inc
Comments
Comment #1
dawehnerIt does already has
So i think that is not really needed, or?
Comment #2
kle commentedsorry - wrong version (I looked at 2.6) in 2.8 it's fine.