Add dividers for each year on View table I have a view listing a custom content type by year and quarter (Spring, Summer, Fall, Winter). It's currently listed in a table. I'd like there to be dividers for each year within the table. Simply a row that names the year before going on to the content that fits within that year. Below is an image of the effect I want to achieve.



I've considered creating a twig template for the view, but I'm not sure how I would be able to check whether an item is the first or last item in a year. I've also considered adding a 'custom text' field but again I'm not sure how I'd make a conditional for that, and I'm not sure how I would be able to turn that into a unique row.

Is there a way to create row dividers in a table view once the year changes, or with any field for that matter?
You can use &quot;Grouping field&quot; option inside view formate settings for year field. Here is example of grouping
1. https://stackoverflow.com/questions/13828952/drupal-7-views-list-group-by-field?answertab=active#tab-top
2. https://www.drupal.org/node/1578512