one called "crops" one is named "products".

Crops linked to products, through a playa field for the products channel.

At the moment my tag produces a list of crops but many are repeated.

When populating a crops menu, I want to query those crops who are linked to a product. This way, crops for which we dont have products assigned aren't listed. I want a unique entry for each crop that has 1 or more products associated to it.

Any ideas?


Here is the code I left out last time...

{if segment_2=="crops"}
<div class="box plants">
    <option {if segment_2==""}selected="selected"{/if} value="/index.php/products/">όλa</option>
        {exp:channel:entries channel="products" orderby="title" sort="asc" dynamic="no"}
            {exp:playa:children channel="crops"}
                {if count>0}
                    <option {if segment_3==url_title}selected="selected" {/if} value="/index.php/products/crops/{url_title}">{title}</option>

The playa relationship is a field in products channel that links to entries (fieldname={crops})in the crops channel. Not sure whether this is revers relationship or not.

  • A little more info would be helpful. What is your current template code, what are the custom fields named? Which one is the playa relationship? Will this be a reverse relationship or a regular one?
    – CreateSean
    Jul 8, 2013 at 16:36
  • Hey CreateSean, I've updated my query as per your request! let me know if I can provide more details! Jul 9, 2013 at 7:37

1 Answer 1


I had exactly this problems, and I used Nested Entries instead. Maybe this can help you too.

{exp:channel:entries channel="country"}
    {exp:nested:prep_vars var_prefix="nested_"}
        {exp:nested:entries channel="office" dynamic="off" search:cf_office_country="{title}"}
            Office: {nested_title}
  • This is great! Has helped loads and has allowed me to really cool stuff with nested playa fields. Thank you ianisted! Jul 17, 2013 at 10:05

Your Answer

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

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