1

I'm using the code below on EE2.5.3 and playa 4.3.3 and am not getting expected results. With the orderby and sort parameters in place, I only get 1 entry returned.

If I remove the orderby and sort parameters I get 4 entries returned, albeit not in the order I want.

Can anyone explain this disparity?

    {exp:channel:entries channel="subcontractors" orderby="title" sort="asc" dynamic="no" disable="categories|category_fields|member_data|pagination"}
        {if {exp:playa:total_parents} >= 1}
            <li>{title} &rarr; {exp:playa:total_parents} Warranty items</li>
        {/if}       
    {/exp:channel:entries}          
3
  • If you leave the sort and orderby params, and comment out the Playa conditional, do you still only see one entry? You may be seeing more, but your Playa conditional prevents them from appearing. Jan 20 '13 at 21:32
  • Removing the playa conditional results in all entries being returned in the expected order. About 100 entries. Of course I only want to return entries with 1 or more parents associated.
    – Stephen
    Jan 20 '13 at 21:56
  • Okay, it's the EE inbuilt 100 entry limit that is the problem. Using the limit parameter to increase this has solved the problem.
    – Stephen
    Jan 20 '13 at 22:02
2

You can use the Playa Children tag to show children, rather than the channel entries tag and then a conditional.

{exp:playa:children field="field_where_relationship_was_made"}
  <li>{title} &rarr; {exp:playa:total_parents} Warranty items</li>
{/exp:playa:children}

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.