How to output every second grouping in views? I have a view that outputs a list of nodes and their taxonomy terms. I use taxonomy field as grouping field. So I get:

Tax1 (article1, article2, article3 )
Tax2 (article4, article5, article6 )
Tax3 (article7, article8, article9 )


etc.

View makes markup for each group like this:

&lt;div class="view-grouping"&gt;
&lt;div class="view-grouping-header"&gt;
&lt;div class="view-grouping-content"&gt;
&lt;div class="views-row views-row-1"&gt;&lt;/div&gt;
&lt;div class="views-row views-row-2"&gt;&lt;/div&gt;
&lt;div class="views-row views-row-3"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;


Question:

How is it possible to output every second grouping?

I would like to have 2 columns with 2 views, first view would output every second grouping and second view would show other groupings.

I'm using Views 3.
This seems like a good use-case for a theme override.

If you click the "advanced" section in the view and click "Theme Information" at the bottom, you'll get a list of theme names. Click on "Style output" and copy the code, and paste it into a file in your theme folder with the most specific name possible (at the end of the list starting with "views-view-unformatted.tpl.php").

Not sure if there's a more elegant way to get a row count (it doesn't seem to be an available tpl variable) but you can DIY like so:

  &lt;?php function count_this_view() {
    static $count = 0;
    return $count++;
  }?&gt;


Then wrap your tpl in a conditional like

  &lt;php if (count_this_view() % 2) :?&gt;