Within my matrix I have two blocks: Day and Event. Day is just a date field while the event block has two text fields.
What's the best way to wrap the event data, which needs to show up as a table format within this loop?
This currently spills everything out in the correct order but the table doesn't open and close correctly around the event block.
The final output should look something like
Title (h2)
Table open
TR
TR
TR
Table close
{% for block in entry.scheduleMatrix %}
{% switch block.type %}
{% case 'day' %}
<h2>{{ block.day.format('l - F j, Y') }} </h2>
<table><tbody>
{% case 'event' %}
<tr><td>{{ block.eventTime }}</td>
<td>{{ block.eventName }}</td></tr>
{% endswitch %}
</tbody>
</table>
{% endfor %}