How to Modify Views output on every 10th item? I have a drupal based project that uses views to output some images and markup in a loop. Each content chunk is similar so pretty standard set up. However I now have a request to uniquely modify every 10th ( or so ) content block that gets output to have a different style and markup.  I am not sure how to handle this in drupal views. Can somebody please point me in the right direction?

I don't know how many items in total would be output.
Views by default wraps each View in a div with a class based on the View's name, eg,

&lt;div class="view view-NAME ... "&gt; &lt;!--content of the view here --&gt; &lt;/div&gt;


and each row in a div with a views-row-# class, eg,

&lt;div class="views-row views-row-1 ..."&gt; &lt;!-- content of view row here --&gt; &lt;/div&gt;
&lt;div class="views-row views-row-2 ..."&gt; &lt;!-- content of view row here --&gt; &lt;/div&gt;
&lt;div class="views-row views-row-3 ..."&gt; &lt;!-- content of view row here --&gt; &lt;/div&gt;


So, quick and dirty, you could change the first 5 of these with css along the lines of

.view-NAME .views-row-10,
.view-NAME .views-row-20,
.view-NAME .views-row-30,
.view-NAME .views-row-40,
.view-NAME .views-row-50 {

   /* different CSS here */

}


You can cascade down from there if you need or want to change the CSS of any of the fields in the row as well.

If you want to get fancier, you can also add classes to each row based upon modulo arithmetic inside of the Views theme templates or via a pre_process hook and then base your css off that class. 

ADDITION BASED ON COMMENTARY:

Can you do something like this with the first/last classes?  Immediately out of the box it sort of does what you want, eg:


creates output like this:



and where last-tenth in this quick and dirty copy and paste is every 10th row?