0

I have what I thought was an obvious task, but I must be doing something incorrect or have encountered a bug.

I have a Parent relationship to another Parent. The parents are teams, and sometimes teams partner, so through the relationship of parent to parent, when looking at one team, I can show the applicable partner team(s)

In my template, I am outputting the first parent (team)/children (members) without issue.

But when I try to output the children of the relationship team, it works, but only shows one entry no matter what parameters I play with. It’s not looping through showing them all.

I've tried siblings, but then I get the results from any relation, not the direct one I am wanting. This simple enough, yet not working.

{rel_partner_teams}
  <div class="member_img">
    {rel_partner_teams:rel_team_members:file_member_photo}
  </div>
{/rel_partner_teams}
2

You need another tag pair, as each tag pair loops through only that one relationship. You need to loop through another set of relationships within each relationship.

{rel_partner_teams}
    {rel_partner_teams:rel_team_members}
        <div class="member_img">
            {rel_partner_teams:rel_team_members:file_member_photo}
        </div>
    {/rel_partner_teams:rel_team_members}
{/rel_partner_teams}

Also, just to clarify language - there is no "parent-to-parent" relationship here, even though you are relating each entry to entries in the same channel. If an entry is selected in a relationship field, it becomes the "child" of the entry it was selected in. So your example is actually "parent to child to child." :)

1
  • Thanks Derek. I had come to see my error late last night after stepping away from it for a while. Thanks for confirming I employed it correctly this time. As well for the correcting my misused terminology. I was thinking about the whole thing wrong at first. Cheers! – Jeremy Jun 17 '17 at 1:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.