6 Registrant Count Shortcode Shared by Jim Michael, The Crossing 5 years ago 7.0 General, Operations, Web Intermediate This is a simple Lava Shortcode that returns the number of Registrants in a particular Registration Instance, by passing the RegistrationInstanceId. You can add the shortcode via Admin | CMS Configuration | Lava Shortcodes and it should be configured as follows: Name: Registrant Count Tag Name: regcount TagType: Inline Description: Returns a count of registrants for a given registration instance Documentation: Use {[ regcount regid:'123' ]} where 123 is a Registration Instance Id to return the number of registrants. Use {[ regcount regid:'123' term:'true' ]} to return the number of registrants AND the "Registrant Term" configured on the registration template, e.g. "10 People" or "50 Campers" Shortcode Markup: {%- assign count = 0 -%} {%- registration where:'RegistrationInstanceId == "{{ regid }}"' -%} {%- for r in registrationItems -%} {%- assign addl = r.Registrants | Size -%} {%- assign count = count | Plus:addl -%} {%- endfor -%} {%- if term == 'true' -%} {{- registrationItems[0].RegistrationInstance.RegistrationTemplate.RegistrantTerm | ToQuantity:count -}} {%- else -%} {{- count -}} {%- endif -%} {%- endregistration -%} Parameters: regid | (no value) term | false Enabled Lava Commands: RockEntity Where would you use this? You can use this ShortCode pretty much anywhere you want to display the number of Registrants in a given Registration Instance, such as a dashboard page for leadership. One obvious place that's likely useful to all Rock organizations is in the Followed Items panel on the My Dashboard page. By default the code that displays the Follow Registrations looks like this <li><i class='fa fa-clipboard icon-fw'></i><a href='{{ LinkUrl | Replace:'[Id]',item.Id }}'> {{ item.Name }}</a></li> But we can add our shortcode to the end of that by passing in the Item.Id, showing the Registrant count as (123) after the registration name, like so: <li><i class='fa fa-clipboard icon-fw'></i><a href='{{ LinkUrl | Replace:'[Id]',item.Id }}'> {{ item.Name}}</a> ({[ regcount regid:'{{ item.Id }}' ]})</li> Props to Michael Garrison for the original shortcode code!