Simple question here hopefully.
I have an album page that displays a track listing. With the option for up to 4 discs being displayed as show below.
DISC 1
Track listing
DISC 2
Track listing
DISC 3
Track listing
DISC 4
Track listing
Here is my EE code
{exp:channel:entries channel="disco" status="open" orderby="disco_release_date" sort="desc" limit="1"}
<div class="disc-tracks">
{disco_disc2_tracks}
<li><h4>{disco_disc2_tracks:title}</h4>
{!--IF STATEMENT SHOWS THE DUET PARTNER AND HIDES THE (WITH) IF THERE ISN'T ONE--}
<p>{if disco_disc2_tracks:track_duet_partner}<em>(with {disco_disc2_tracks:track_duet_partner})</em>{/if}</p>
<p><span class="songwrittenby">Written By: {disco_disc2_tracks:track_writtenby}</span></p></li>
{/disco_disc2_tracks}
</div></ol><!-- END DISCOGRAPY DISC 2 TRACKS -->
{/exp:channel:entries}
I have 4 of those on the page. 1 for every disc I want to wrap everyone in an IF statement so that if no tracks are selected on the channel entries page for a specific disc aka that disc has 0 tracks selected - that it doesn't show the header "Disc 2" "Disc 3" "Disc 4" and have empty titles on my page. I have an IF statement for the duet partner already in my code above and it works great, but I can't seem to write one that can hide the whole header and div containing the Disc # and tracks.
Also the tracks are a relationship filed and I'm pulling them from another channel. See image