0

I have 2 channels, "vehicle" and "make". Vehicle uses a text input channel field, make uses a dropdown select channel field.

In the "vehicle" channel I also have a relationship field to "make".

I would like to have a count for how many times I have set a vehicle to a particular make. Let's take Acura for example. I have entered in 20 Acura cars, and 5 Nissan cars. I would like to show 20 next to Acura.

And perhaps a total_count would be good too, of all of the vehicle+make relationships that are combined. (25)

Can this be done relatively easily in EE 2.9.2?

Thanks!

1

You should be able to use {relationship_field:total_results} to get the total results with relationship_field changed to whatever your field name is for your relationship field.

There are a bunch of parameters you can further use to further filter your results in the Relationship documentation.

| improve this answer | |
  • The relationship field is "rel__vehicle_make", and my code is {rel__vehicle_make:total_entries} but It doesn't appear to be working. No output or anything, just blank. – user5017 Feb 9 '15 at 2:09
  • Any ideas what might be wrong with the code or EE setup? Thank you! :) – user5017 Feb 10 '15 at 22:41
  • They using :total_results not :total_count as you have posted it. – stuartmcd69 Apr 12 '15 at 2:16
  • Indeed it should be {rel_vehicle_make:total_results} and not :total_entries – Justin Long Apr 12 '15 at 2:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy