Views Grouping field:Add Ordered class to Grouping row I use Views and Grouping field to integrate my data.
But i need each grouping row ordered.

I want to override the views-view-grouping.tpl.php, and change the "view-grouping" class to "view-grouping-1","view-grouping-2","view-grouping-3"...

The original code is belowed:

    &lt;?php

/**
 * @file
 * This template is used to print a single grouping in a view.
 *
 * It is not actually used in default Views, as this is registered as a theme
 * function which has better performance. For single overrides, the template is
 * perfectly okay.
 *
 * Variables available:
 * - $view: The view object
 * - $grouping: The grouping instruction.
 * - $grouping_level: Integer indicating the hierarchical level of the grouping.
 * - $rows: The rows contained in this grouping.
 * - $title: The title of this grouping.
 * - $content: The processed content output that will normally be used.
 */

?&gt;
&lt;div class="view-grouping"&gt;
  &lt;div class="view-grouping-header"&gt;&lt;?php print $title; ?&gt;&lt;/div&gt;
  &lt;div class="view-grouping-content"&gt;
    &lt;?php print $content; ?&gt;
  &lt;/div&gt;
&lt;/div&gt;


The File is located at all/module/views/theme/

Does someone meet the same problem before?

Thx for help.
Javascript?


$('.view-grouping').each(function(i){
  $(this).addClass('view-grouping-' + (i+1));
});