I'm trying to create a tabbed agenda for an event. I have a post type (Agenda Days) that contains a repeating field group. A new post is created for each day of the event, and the repeating field group is used for each time slot on that day.
I've created a view that loops through each post of the Agenda Days post type, and another view that loops through each time slot on each day. This works fine if I want a simple list like this:
Day 1
8:00 - 9:00 item 1
9:00 - 10:00 item 2
Day 2
8:00 - 9:00 item 1
9:00 - 10:00 item 2
etc.
However, I want to put each day in a tab and have the time slots for that day in the content pane of that tab. I'm using Foundation for my front-end framework, however the functionality is very similar to Bootstratp.
Unlike accordions, where the title link is immediately followed by the content for each accordion, with tabs, I need to separate the tab code from the content code so the output is like this:
<!-- THE TABS -->
<ul class="tabs" data-responsive-accordion-tabs="tabs small-accordion medium-tabs" id="example-tabs">
<li class="tabs-title">DAY 1 TAB
<li class="tabs-title">DAY 2 TAB
<li class="tabs-title">DAY 3 TAB
<!-- THE TAB CONTENT PANES -->
<div class="tabs-content" data-tabs-content="example-tabs">
<div class="tabs-panel" id="day-1-slug">
DAY 1 REPEATING FIELDS
</div>
<div class="tabs-panel" id="day-2-slug">
DAY 2 REPEATING FIELDS
</div>
<div class="tabs-panel" id="day-3-slug">
DAY 3 REPEATING FIELDS
</div>
</div>
However, the repeating fields view need to be inside the Agenda Days view in order to relate the proper content to the proper days. This creates a problem in that the div that wraps the tab content (tabs-content) gets repeated with every item in the loop so the tabs don't work. If I simply place the two view shortcodes one after another on a page, the repeating fields view returns "No items found". My guess is that since the repeating fields shortcode is not inside the Agenda Day view, it has no idea what content to display in the tab content pane.
So the question is this: is there a way to relate the repeating field group of a post to its parent post even if they are not in the same view?