• Resolved beevera

    (@beevera)


    Hi,
    I have a pod template of Pod A, which has a relationship to B (A has many B), so the field is named Bs.
    So in the template, if I do
    {@Bs} this will show: B1 and B2...
    But I’d like to show the total number of Bs. If I do
    {@Bs._total} or {@Bs._total_found}there’s nothing shown.
    Do you have any ideas?
    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Jim True

    (@jimtrue)

    Neither, _total or _total_found are legal magic tag helper functions. Nice try, but we typically document stuff like that.

    You can, however, use the php function count against the relationship field, like {@related_item,count}

    Thread Starter beevera

    (@beevera)

    Hi Jim, as usual, there’s always the solution with you! Thank you alot!

    Plugin Contributor Jim True

    (@jimtrue)

    You’re welcome! I try 😉

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Counting relationship elements’ is closed to new replies.