When grouping view results by field, it would be much easier for theming if the output wrapped the groups in a div, instead of just inserting h3's above the rows div's. It would be great to see HTML ouput something like this:

<div class="view-content">
    <div class="group-1">
          <h3>Group 1</h3>
               <div class="views-row-1 views-row-odd views-row-first">
                  ...
               </div>
               <div class="views-row-2 views-row-even views-row-last">
                  ...
               </div>
    </div> <!-- /group-1 -->     
    <div class="group-2">   
          <h3>Group 2</h3>
              <div class="views-row-1 views-row-odd views-row-first">
                 ...
              </div>
              <div class="views-row-2 views-row-even views-row-last">
                 ...
              </div>
     </div> <!-- /group-2 -->
</div> <!-- /view-content -->

Right now, I'm stuck doing this with jQuery, and it works, but its complicated and messy.

Thanks!

Comments

jrefano’s picture

Status: Active » Closed (fixed)

My mistake, just realized you can provide a template file for this. Closed

WorldFallz’s picture

Can I ask which template you used to get this output?

daggerhart’s picture

For future search references: The answer is the 'Style output' template.