how to get the sort number in relationship tag? the sort number is store in "order" in exp_relationships. I need it to sort my data. but have no idea how to retrieve it.

1 Answer 1


As posted here -- http://www.blue-dreamer.co.uk/blog/entry/ee2.6-new-relationship-tags -- you can use these variations of {count}.

Related Entries

{if custom_field:count == "1"}
{if custom_field:count == custom_field:total_results}
{if custom_field:no_results}No related entries{/if}

Parent Entries

{parents field="custom_field"}
{if parents:count == "1"}
{if parents:count == parents:total_results}
{if parents:no_results}No parent entries{/if}

Sibling Entries

{siblings field="custom_field"}
{if siblings:count == "1"}
{if siblings:count == siblings:total_results}
{if siblings:no_results}No results{/if}

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.