1

I have one channel named Zone (zones) (All Zone entries are named zone 01, zone 02, etc)

A second channel is named Club Listing (club_listing) (All club entries are named Dubbo, Eden, etc) Within this channel is a relationship field {zone} that relates to the Zone channel.

So each club (200+) belongs to a certain zone (28).

All i need to do is list all the clubs, but have them grouped by zone;

Zone 01
- Alstonville
- Bega

Zone 02
- Avondale
- Eden

Zone 03
- Blacktown
- Dubbo

Is this possible to do? (Natively or add-on required?)

{exp:channel:entries channel="club_listing" dynamic="no" sort="asc" orderby="zone"}
???
<h4>{title}</h4>
{/exp:channel:entries}


ANY help is much appreciated!

1 Answer 1

1

In this case the Club Listing entries would be the parents of the Zone entries. You should be able to loop through the Zones channel and call the parents of each Zone entry within the Club Listing channel. So something like:

{exp:channel:entries channel="zones"}
    <h4>{title}</h4>
    {parents field="zone_relationship_field" channel="club_listing"}
        {parents:title}<br>
    {/parents}
{/exp:channel:entries}

Here's the tag reference in the docs - http://ellislab.com/expressionengine/user-guide/add-ons/channel/relationships.html#accessing-parents

1
  • THANK YOU so much. (I had been staring at that reference page for ages trying to work it out.) Much appreciated.
    – ZEDG
    Jul 30, 2014 at 16:00

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.