Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.2
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Feb 2009 at 21:51 UTC
Updated:
14 Jul 2011 at 19:12 UTC
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
Comment #1
jrefano commentedMy mistake, just realized you can provide a template file for this. Closed
Comment #2
WorldFallz commentedCan I ask which template you used to get this output?
Comment #3
daggerhart commentedFor future search references: The answer is the 'Style output' template.