Is there a way to get the total number of items chosen in a multiple relationships field?
2 Answers
Did you try this tag:
{relationship_field:total_results}
Example:
{exp:channel:entries channel="xyz"}
{relationship_field}
{relationship_field:total_results}
{/relationship_field}
{/exp:channel:entries}
In addition to Bhashkar Yadav's answer, this worked successfully for me:
{exp:channel:entries channel='channel_xyz' status='not closed'}
{if relationship_field:total_results > 0}
...do something!
{/if}
{/exp:channel:entries}
...that is, having it outside of the relationship field loop.