2

Lets say I have Channel A and B.

Channel A has a Field X which is a relationship to channel B.

Is there a way for the {exp:channel:entries} tag to get

  1. only those Channel B entries that are referred by current entries in Channel A?
  2. the number of entries in Channel A that are associated to each respective Channel B entries?

For example:

If Channel A has these entries

Entry 1, Relationship to Channel B entry 1
Entry 2, Relationship to Channel B entry 1
Entry 3, Relationship to Channel B entry 2

and Channel B has these entries

Entry 1, Foo
Entry 2, Bar
Entry 3, Test

then

No. 1 should return

Entry 1, Foo
Entry 2, Bar

No. 2 should return

Entry 1, Foo, Referred 2 times
Entry 2, Bar, Referred 1 time

1 Answer 1

1

Playa's Parent & Children tags should do what you're looking for. They have documentation on converting a native Relationship field to a Playa field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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